Submission #22034

#TimeUsernameProblemLanguageResultExecution timeMemory
22034현재PC방은도타2가점령!! (#42)시간과 날짜 (KRIII5P_1)C++98
7 / 7
16 ms2020 KiB
#include <bits/stdc++.h> using namespace std; int main () { int T; cin >> T; int days[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; while(T--) { int x, y; cin >> x >> y; if(0<=x && x<24 && 0<=y && y<60) cout << "Yes "; else cout << "No "; if(1<=x && x<=12 && 1<=y && y<=days[x]) cout << "Yes\n"; else cout << "No\n"; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...