Submission #22180

#TimeUsernameProblemLanguageResultExecution timeMemory
22180스팟보드CSS가깨져요 (#42)시간과 날짜 (KRIII5P_1)C++98
7 / 7
3 ms1116 KiB
#include<stdio.h> #define btw(a,x,b) ((a)<=(x) && (x)<=(b)) int days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31}; int main(){ int t; for(scanf("%d",&t);t--;){ int s, e; scanf("%d%d", &s, &e); printf(btw(0,s,23) && btw(0,e,59) ? "Yes " : "No "); puts(btw(1,s,12) && btw(1,e,days[s]) ? "Yes" : "No"); } return 0; }

Compilation message (stderr)

td.cpp: In function 'int main()':
td.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for(scanf("%d",&t);t--;){
                    ^
td.cpp:10:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d", &s, &e);
                        ^
#Verdict Execution timeMemoryGrader output
Fetching results...