#include <iostream> #include <algorithm> #include <string.h> using namespace std; int E, S, M; int e = 1; int s = 1; int m = 1; int year = 1; int main(void) { // freopen("B1476_input.txt", "r", stdin); cin >> E >> S >> M; while(1) { if(e > 15) { e = 1; } if(s > 28) { s = 1; } if(m > 19) { m = 1; } if(E == e && S == s && M == m) { cout << year; break; } e++; s++; m++; year++; } return 0; } | cs |
'Baekjoon > etc' 카테고리의 다른 글
[백준 15565] 귀여운 라이언 (Two Pointer) (C/C++) (0) | 2020.03.29 |
---|---|
[백준 2003] 수들의 합 2 (Two Pointer) (C/C++) (0) | 2020.03.29 |
[백준 1213] 팰린드롬 만들기 (C/C++) (0) | 2020.03.23 |
[백준 1158] 요세푸스 문제 (Queue) (C/C++) (0) | 2020.01.24 |
[백준 1406] 에디터 (Linked List) (C/C++) (0) | 2020.01.23 |