Submission #22148

#TimeUsernameProblemLanguageResultExecution timeMemory
22148_(:3」∠)_ (#42)시간과 날짜 (KRIII5P_1)C++11
7 / 7
3 ms1116 KiB
#include <cstdio> int days[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main(){ int T; scanf("%d", &T); for(; T--; ){ int x, y; scanf("%d%d", &x, &y); printf("%s ", x >= 0 && x <= 23 && y >= 0 && y <= 59 ? "Yes" : "No"); printf("%s\n", x >= 1 && x <= 12 && y >= 1 && y <= days[x] ? "Yes" : "No"); } return 0; }

Compilation message (stderr)

td.cpp: In function 'int main()':
td.cpp:6:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int T; scanf("%d", &T);
                         ^
td.cpp:8:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     int x, y; scanf("%d%d", &x, &y);
                                    ^
#Verdict Execution timeMemoryGrader output
Fetching results...