# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22128 | SCIK (#42) | 시간과 날짜 (KRIII5P_1) | C++98 | 3 ms | 1116 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
//
// main.cpp
// r
//
// Created by 수익 조 on 2017. 4. 29..
// Copyright © 2017년 수익 조. All rights reserved.
//
#include <stdio.h>
int main(void) {
int testcase;
scanf("%d", &testcase);
for(int t = 1; t <= testcase; t++) {
int x = 0;
int y = 0;
scanf("%d %d", &x, &y);
if(x < 24 && y < 60) printf("YES ");
else printf("NO ");
if(x == 1 || x == 3 || x == 5 || x == 7|| x == 8 || x == 10 || x == 12) {
if(y >= 1 && y <= 31) printf("YES\n");
else printf("NO\n");
}
else if( x == 4 || x == 6 || x == 9 || x == 11) {
if(y >= 1 && y <= 30) printf("YES\n");
else printf("NO\n");
}
else if(x == 2) {
if( y >= 1 && y <= 29) printf("YES\n");
else printf("NO\n");
}
else printf("NO\n");
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |