제출 #22134

#제출 시각아이디문제언어결과실행 시간메모리
22134연습대회 팀 네임은 수정할 수 있을까? (#42)시간과 날짜 (KRIII5P_1)C++14
2 / 7
0 ms1116 KiB
#include <stdio.h> #include <algorithm> #include <vector> #include <functional> #include <set> #include <map> #include <queue> #include <tuple> #include <string.h> using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++) typedef long long ll; int day[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main() { int TC; scanf("%d", &TC); while(TC--) { int x, y; scanf("%d%d", &x, &y); if(x >= 0 && x <= 23 && y >= 0 && y <= 59) printf("Yes "); else printf("No "); if(x >= 1 && x <= 12 && day[x] >= y) printf("Yes\n"); else printf("No\n"); } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

td.cpp: In function 'int main()':
td.cpp:18:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int TC; scanf("%d", &TC);
                          ^
td.cpp:20:34: 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...