結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-09 09:23:46
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,048 KB
最終ジャッジ日時 2023-09-14 17:37:40
合計ジャッジ時間 1,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,872 KB
testcase_01 AC 12 ms
6,048 KB
testcase_02 AC 11 ms
5,972 KB
testcase_03 AC 11 ms
5,888 KB
testcase_04 AC 11 ms
5,936 KB
testcase_05 AC 11 ms
5,996 KB
testcase_06 AC 11 ms
5,944 KB
testcase_07 AC 11 ms
5,876 KB
testcase_08 AC 11 ms
6,016 KB
testcase_09 AC 11 ms
5,860 KB
testcase_10 AC 11 ms
5,940 KB
testcase_11 AC 11 ms
6,024 KB
testcase_12 AC 11 ms
5,868 KB
testcase_13 AC 11 ms
5,892 KB
testcase_14 AC 11 ms
5,868 KB
testcase_15 AC 11 ms
5,940 KB
testcase_16 AC 12 ms
6,048 KB
testcase_17 AC 11 ms
5,864 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 11 ms
5,860 KB
権限があれば一括ダウンロードができます

ソースコード

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