Submission #22057

# Submission time Handle Problem Language Result Execution time Memory
22057 2017-04-29T06:17:22 Z 아재 goto 써요?(#1011, baactree) None (KRIII5P_1) C++14
2 / 7
3 ms 2020 KB
// =====================================================================================
// 
//       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

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 time Memory Grader output
1 Partially correct 3 ms 2020 KB Output is partially correct