結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー tktktktk
提出日時 2019-03-31 21:03:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 1,223 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-05-02 01:08:09
合計ジャッジ時間 1,647 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,880 KB
testcase_01 AC 34 ms
11,008 KB
testcase_02 AC 36 ms
10,880 KB
testcase_03 AC 34 ms
10,880 KB
testcase_04 WA -
testcase_05 AC 32 ms
10,880 KB
testcase_06 AC 32 ms
10,880 KB
testcase_07 AC 33 ms
11,008 KB
testcase_08 AC 32 ms
10,880 KB
testcase_09 AC 32 ms
11,008 KB
testcase_10 AC 32 ms
11,008 KB
testcase_11 AC 32 ms
11,008 KB
testcase_12 AC 34 ms
11,008 KB
testcase_13 AC 34 ms
11,008 KB
testcase_14 AC 32 ms
10,880 KB
testcase_15 AC 31 ms
10,880 KB
testcase_16 AC 31 ms
11,008 KB
testcase_17 AC 32 ms
11,008 KB
testcase_18 AC 34 ms
11,008 KB
testcase_19 AC 33 ms
10,880 KB
testcase_20 AC 32 ms
10,880 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))):
    print(str(YYYY)+'/'+'03'+'/'+'01')
elif MM == 2 and DD == 28:
    if YYYY % 100 == 0 and YYYY % 400 != 0:
        print(str(YYYY)+'/'+'03'+'/'+'02')
    elif 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