답안 #22180

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
22180 2017-04-29T14:53:06 Z 스팟보드CSS가깨져요(#1029, imsifile) 시간과 날짜 (KRIII5P_1) C++
7 / 7
3 ms 1116 KB
#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

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);
                        ^
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 1116 KB Output is correct