# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22061 | 2017-04-29T06:44:52 Z | 연습 세션과 본 대회의 등록은 왜 따로일까(#1013, gs13105) | None (KRIII5P_1) | C++14 | 3 ms | 1116 KB |
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; int main() { int x, y, t, i; scanf("%d", &t); for(i = 0; i<t; i++) { scanf("%d%d", &x, &y); printf(0<=x&&x<=23 && 0<=y&&y<=59 ? "Yes " : "No "); if(x == 1 ||x == 3 ||x == 5 ||x == 7 ||x == 8 ||x == 10 ||x == 12) printf(1<=y&&y<=31 ? "Yes" : "No"); else if(x == 4 ||x == 6 ||x == 9 ||x == 11) printf(1<=y&&y<=30 ? "Yes" : "No"); else if(x == 2) printf(1<=y&&y<=29 ? "Yes" : "No"); else printf("No"); printf("\n"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 1116 KB | Output is correct |