답안 #22200

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
22200 2017-04-29T17:38:31 Z 새벽 2시 22분(#1037, junodeveloper) 시간과 날짜 (KRIII5P_1) C++14
7 / 7
3 ms 1116 KB
#include<stdio.h>
int t,x,y,d[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main() {
    scanf("%d",&t);
    while(t--) {
        scanf("%d%d",&x,&y);
        printf("%s ", 0<=x && x<=23 && 0<=y && y<=59 ? "Yes" : "No");
        puts(1<=x && x<=12 && 1<=y && y<=d[x] ? "Yes" : "No");
    }
    return 0;
}

Compilation message

td.cpp: In function 'int main()':
td.cpp:4:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&t);
                   ^
td.cpp:6:28: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d%d",&x,&y);
                            ^
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 1116 KB Output is correct