結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー tktktktk
提出日時 2019-03-31 20:40:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,039 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-05-02 00:32:03
合計ジャッジ時間 1,748 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

YYYY,MM,DD = map(int, input().split('/'))
if (MM == 2 and DD == 27 and YYYY % 4 != 0) or (MM == 2 and DD == 28 and YYYY % 4 == 0):
    print(str(YYYY)+'/'+'03'+'/'+'01')
elif MM == 2 and DD == 28 and YYYY % 4 != 0:
    print(str(YYYY)+'/'+'03'+'/'+'02')
elif DD <= 28:
    print(str(YYYY)+'/'+str(MM).zfill(2)+'/'+str(DD+2).zfill(2))
elif DD == 29:
    if (MM == (1 or 3 or 5 or 7 or 8 or 10 or 12)) or (MM == 2 and YYYY % 4 ==0):
        print(str(YYYY)+'/'+str(MM).zfill(2)+'/'+str(DD+2).zfill(2))
    else:
        if MM != 12:
            print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'01')
        else:
            print(str(YYYY+1)+'/'+'01'+'/'+'01')
elif DD == 30:
    if MM == (1 or 3 or 5 or 7 or 8 or 10):
        print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'01')
    elif MM == 12:
        print(str(YYYY+1)+'/'+'01'+'/'+'01')
    else:
        print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'02')
else:
    if MM == 12:
         print(str(YYYY+1)+'/'+'01'+'/'+'02')
    else:
         print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'02')
0