結果

問題 No.721 Die tertia (ディエ・テルツィア)
コンテスト
ユーザー bellangeldindon
提出日時 2019-05-09 09:23:46
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 457 bytes
記録
コンパイル時間 141 ms
コンパイル使用メモリ 77,328 KB
最終ジャッジ日時 2025-12-04 01:39:33
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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