# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22132 | 나자바봐랑 (#42) | 시간과 날짜 (KRIII5P_1) | C11 | 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.
#include <stdio.h>
typedef enum {false, true} bool;
int main(int argc, const char * argv[]) {
int T;
scanf("%d", &T);
while(T-- > 0) {
int x = 0;
int y = 0;
scanf("%d %d", &x, &y);
bool hour = (0 <= x && x <= 23 ? true : false);
bool minute = (0 <= y && y <= 59 ? true : false);
bool month = (1 <= x && x <= 12 ? true : false);
bool day = false;
if(month) {
if(x == 2) {
day = (1 <= y && y <= 29 ? true : false);
}
else if(x % 2 == 1 || x == 8) {
day = (1 <= y && y <= 31 ? true : false);
}
else {
day = (1 <= x && x <= 30 ? true : false);
}
}
hour && minute ? printf("Yes ") : printf("No ");
month && day ? printf("Yes\n") : printf("No\n");
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |