# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22050 | nemo (#42) | 시간과 날짜 (KRIII5P_1) | Cpython 2 | 72 ms | 3 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.
def f(x,y):
return 0<=x<=23 and 0<=y<=59
def g(x,y):
a = [31,29]+[31,30]*2+[31,31]+[30,31]*2
return 1<=x<=12 and 1<=y<=a[x-1]
for i in range(input()):
x,y = map(int,raw_input().split())
a = "YES" if f(x,y) else "NO"
b = "YES" if g(x,y) else "NO"
print a, b
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |