Submission #22128

#TimeUsernameProblemLanguageResultExecution timeMemory
22128SCIK (#42)시간과 날짜 (KRIII5P_1)C++98
0 / 7
3 ms1116 KiB
// // 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)

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