C++/C++ : BAEKJOON

[백준] 2753번 윤년 c++

더블유제이플로어 2024. 9. 7. 17:34

https://www.acmicpc.net/problem/2753

 

 

#include <iostream>
using namespace std;

int main()
{
    int iYear;
    cin >> iYear;
    if((iYear %4 == 0 && iYear %100 !=0) || iYear % 400 ==0)
        cout << "1" <<endl;
    else
        cout << "0" << endl;
    return 0;
}