結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー otsunekootsuneko
提出日時 2021-05-07 18:17:30
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 71,656 KB
最終ジャッジ日時 2023-10-13 09:28:29
合計ジャッジ時間 3,242 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,388 KB
testcase_01 AC 71 ms
71,532 KB
testcase_02 AC 74 ms
71,432 KB
testcase_03 AC 71 ms
71,416 KB
testcase_04 AC 70 ms
71,284 KB
testcase_05 AC 71 ms
71,652 KB
testcase_06 AC 70 ms
71,440 KB
testcase_07 AC 70 ms
71,356 KB
testcase_08 AC 70 ms
71,284 KB
testcase_09 AC 70 ms
71,440 KB
testcase_10 AC 70 ms
71,328 KB
testcase_11 AC 70 ms
71,528 KB
testcase_12 AC 71 ms
71,520 KB
testcase_13 AC 71 ms
71,652 KB
testcase_14 AC 72 ms
71,436 KB
testcase_15 AC 72 ms
71,468 KB
testcase_16 AC 70 ms
71,328 KB
testcase_17 AC 72 ms
71,428 KB
testcase_18 AC 71 ms
71,328 KB
testcase_19 AC 71 ms
71,656 KB
testcase_20 AC 70 ms
71,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

days_in_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
Y,M,D = map(int,input().split("/"))
D += 2

if Y%4 == 0 and not (Y%100 == 0 and Y%400 != 0):
    days_in_month[1] = 29

if days_in_month[M-1] < D:
    D -= days_in_month[M-1]
    M += 1

if M > 12:
    Y += 1
    M = 1

print(str(Y).zfill(2)+"/"+str(M).zfill(2)+"/"+str(D).zfill(2))
0