Submission #22200

# Submission time Handle Problem Language Result Execution time Memory
22200 2017-04-29T17:38:31 Z 새벽 2시 22분(#1037, junodeveloper) None (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);
                            ^
# Verdict Execution time Memory Grader output
1 Correct 3 ms 1116 KB Output is correct