코드포스
[코드포스 Practice7] B. Fake NP
불타는강정
2019. 12. 26. 15:37
어.. 이거 딱봐도 2인데???
해서 바로 2출력했다가 틀렸다.
홀수일 경우를 빼먹어서 홀수인 경우에는 자기자신을 출력하게 했다.
#include <iostream>
using namespace std;
int main() {
int l, r;
cin >> l >> r;
if(l == r)
cout << l;
else
cout<<"2";
}
끝~~