Submission #22058

#TimeUsernameProblemLanguageResultExecution timeMemory
22058아재 goto 써요? (#42)시간과 날짜 (KRIII5P_1)C++14
7 / 7
3 ms2020 KiB
// ===================================================================================== // // Filename: td.cpp // Created: 2017년 04월 29일 15시 12분 11초 // Compiler: g++ -O2 -std=c++14 // Author: baactree , [email protected] // Company: Chonnam National University // // ===================================================================================== #include <bits/stdc++.h> using namespace std; int m[13]={0, 32, 30, 32, 31, 32, 31, 32, 32, 31, 32, 31, 32}; int main(){ int TestCase; scanf("%d", &TestCase); while(TestCase--){ int x, y; scanf("%d%d", &x, &y); if(x>=0&&x<24&&y>=0&&y<60) printf("Yes "); else printf("No "); if(x>0&&x<13&&y>0&&y<m[x]) printf("Yes\n"); else printf("No\n"); } return 0; }

Compilation message (stderr)

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