結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー bellangeldindon
提出日時 2019-05-09 09:23:46
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-07-02 00:44:19
合計ジャッジ時間 1,016 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

Y, M, D = map(int, raw_input().split('/'))
calendar = []
small = [4, 6, 9, 11]
for i in range(0, 12):
	if i == 2:
		if Y % 4 == 0: calendar.append(29)
		else: calendar.append(28)
	elif i in small: calendar.append(30)
	else: calendar.append(31)
D += 2
if D > calendar[M%12]:
	D -= calendar[M%12]
	M += 1
if M > 12:
	Y += 1
	M -= 12
ans = str(Y) + '/'
if M < 10: ans = ans + '0'
ans = ans + str(M) + '/'
if D < 10: ans = ans + '0'
ans = ans + str(D)
print ans
0