1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<iostream>
#include<stdio.h>
using namespace std;
 
int main() {
    int year = 0;
 
    cin >> year;
 
    if (((year % 4 == 0&& (year % 100!= 0|| (year % 400 == 0))cout << "1" << endl;
    else cout << "0" << endl;
 
 
    return 0;
 

 

그냥 문제에서 하라는 대로 해버림,..,

'스터디 > 알고리즘' 카테고리의 다른 글

C++ 백준 8958 - OX퀴즈  (0) 2019.11.17
C++ 백준 1546 - 평균  (0) 2019.11.17
C++ 백준 2577 - 숫자의 개수  (0) 2019.11.17
C++ 백준 10951 - A+B - 4  (0) 2019.11.14
C++ 백준 2884 - 알람시계  (0) 2019.09.09

+ Recent posts