結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー maimai8maimai8
提出日時 2019-06-11 09:56:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 888 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-15 20:33:58
合計ジャッジ時間 1,312 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def year(y, m):
    if m == "12":
        m = "01"
        y = int(y) + 1
    else:
        m = int(m) + 1
        if m < 10:
            m = "0" + str(m)
    return y, m
if __name__ == '__main__':
    s = list(input())
    y = "".join(s[0:4])
    m = "".join(s[5:7])
    d = "".join(s[8:10])
    small = ["2", "4", "6", "9", "11"]
    if m in small:
        if d <= "28":
            d = int(d) + 2
            if d < 10:
                d = "0" + str(d)
        elif d == "29":
            y, m = year(y, m)
            d = "01"
        else:
            y, m = year(y, m)
            d = "02"
    else:
        if d <= "29":
            d = int(d) + 2
            if d < 10:
                d = "0" + str(d)
        elif d == "30":
            y, m = year(y, m)
            d = "01"
        else:
            y, m = year(y, m)
            d = "02"
    print("{}/{}/{}".format(y, m, d))
0