結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー tktktktk
提出日時 2019-03-31 20:48:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,086 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-05-02 00:52:07
合計ジャッジ時間 1,372 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

YYYY,MM,DD = map(int, input().split('/'))
if (MM == 2 and DD == 27 and (YYYY % 4 != 0) or ((YYYY % 100 == 0) and (YYYY % 400 != 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