結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー Takayuki HirotaTakayuki Hirota
提出日時 2020-12-25 11:33:18
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,652 KB
実行使用メモリ 53,404 KB
最終ジャッジ日時 2023-10-22 03:07:05
合計ジャッジ時間 2,052 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

y,m,d=map(int,input().split('/'))
days={1:31,2:28,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30,12:31}
if y%4==0:
	if y%400==0:
		days[2]=29
	elif y%100>0:
		days[2]=29
	
if d+2>days[m]:
	if m==12:
		y+=1
		m=1
		d-=29
	else:
		d+=2-days[m] 
		m+=1
else:
	d+=2
print('{:04}/{:02}/{:02}'.format(y,m,d))
0