지극히 개인적인 개발블로그
백준 2753: 윤년 (C++) 본문
#include <iostream>
using namespace std;
int main()
{
bool ans = false;
int year;
cin >> year;
if ((year % 4 == 0) && (year % 400 == 0 || year % 100 != 0))
ans = true;
cout << ans<<endl;
}
if식에 조금만 신경쓰면 됩니다.