Submission #22086

#TimeUsernameProblemLanguageResultExecution timeMemory
22086삼*전자 그린픽스 (#42)시간과 날짜 (KRIII5P_1)C++98
7 / 7
3 ms1116 KiB
#include<stdio.h> int n, m; int a[99] = { 0,31,29,31,30,31,30,31,31,30,31,30,31 }; int main() { int t; scanf("%d", &t); while (t--) { scanf("%d %d", &n, &m); int r1, r2; r1 = r2 = 0; if (n >= 0 && n < 24) if (m >= 0 && m < 60) r1 = 1; if (n > 0 && n <= 12) if (m > 0 && m <= a[n]) r2 = 1; printf("%s %s\n", r1 ? "Yes" : "No", r2 ? "Yes" : "No"); } return 0; }

Compilation message (stderr)

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