結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー kidhrnkidhrn
提出日時 2020-03-17 23:17:17
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 1,278 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 28,180 KB
実行使用メモリ 4,568 KB
最終ジャッジ日時 2023-08-20 19:27:36
合計ジャッジ時間 1,244 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 0 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,380 KB
testcase_06 WA -
testcase_07 AC 0 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 AC 0 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 0 ms
4,380 KB
testcase_15 AC 0 ms
4,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int main(void){
    
    int n,m,k;
    char l,s;
    scanf("%d%c%d%c%d",&n,&l,&m,&s,&k);
 
    if(m==12){
        if(k==30)printf("%d/01/01\n",n+1);
        if(k==31)printf("%d/01/02\n",n+1);
        else printf("%d/%02d/%02d\n",n,m,k+2);   }
    
    else{
        if(m==2){
            if(n%4==0){
                if(k==28)printf("%d/03/01\n",n);
                else if(k==29)printf("%d/03/02\n",n);
                else printf("%d/02%d/%02d\n",n,m,k+2);          }
            else{
                if(k==27)printf("%d/03/01\n",n);
                else if(k==28)printf("%d/03/02\n",n);
                else printf("%d/%02d/%02d\n",n,m,k+2);          } }
        
        if(m==4||m==6){
            if(k==29)printf("%d/%02d/01\n",n,m+1);
            else if(k==30)printf("%d/%02d/02\n",n,m+1);
            else printf("%d/%02d/%02d\n",n,m,k+2);   }
        if(m==9||m==11){
            if(k==29)printf("%d/%02d/01\n",n,m+1);
            else if(k==30)printf("%d/%02d/02\n",n,m+1);
            else printf("%d/%02d/%02d\n",n,m,k+2);   }
        
        else{
            if(k==30)printf("%d/%02d/01\n",n,m+1);
            else if(k==31)printf("%d/%02d/02\n",n,m+1);
            else printf("%d/%02d/%02d\n",n,m,k+2);   } }
    
    
    return 0;
    
}
0