제출 #22061

#제출 시각아이디문제언어결과실행 시간메모리
22061연습 세션과 본 대회의 등록은 왜 따로일까 (#42)시간과 날짜 (KRIII5P_1)C++14
7 / 7
3 ms1116 KiB
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    int x, y, t, i;
    scanf("%d", &t);
    for(i = 0; i<t; i++)
    {
        scanf("%d%d", &x, &y);

        printf(0<=x&&x<=23 && 0<=y&&y<=59 ? "Yes " : "No ");

        if(x == 1 ||x == 3 ||x == 5 ||x == 7 ||x == 8 ||x == 10 ||x == 12)
            printf(1<=y&&y<=31 ? "Yes" : "No");
        else if(x == 4 ||x == 6 ||x == 9 ||x == 11)
            printf(1<=y&&y<=30 ? "Yes" : "No");
        else if(x == 2)
            printf(1<=y&&y<=29 ? "Yes" : "No");
        else
            printf("No");

        printf("\n");
    }
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

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