結果
| 問題 |
No.721 Die tertia (ディエ・テルツィア)
|
| コンテスト | |
| ユーザー |
tktk
|
| 提出日時 | 2019-03-31 20:40:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,039 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-22 09:15:29 |
| 合計ジャッジ時間 | 1,740 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 2 |
ソースコード
YYYY,MM,DD = map(int, input().split('/'))
if (MM == 2 and DD == 27 and YYYY % 4 != 0) or (MM == 2 and DD == 28 and YYYY % 4 == 0):
print(str(YYYY)+'/'+'03'+'/'+'01')
elif MM == 2 and DD == 28 and YYYY % 4 != 0:
print(str(YYYY)+'/'+'03'+'/'+'02')
elif DD <= 28:
print(str(YYYY)+'/'+str(MM).zfill(2)+'/'+str(DD+2).zfill(2))
elif DD == 29:
if (MM == (1 or 3 or 5 or 7 or 8 or 10 or 12)) or (MM == 2 and YYYY % 4 ==0):
print(str(YYYY)+'/'+str(MM).zfill(2)+'/'+str(DD+2).zfill(2))
else:
if MM != 12:
print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'01')
else:
print(str(YYYY+1)+'/'+'01'+'/'+'01')
elif DD == 30:
if MM == (1 or 3 or 5 or 7 or 8 or 10):
print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'01')
elif MM == 12:
print(str(YYYY+1)+'/'+'01'+'/'+'01')
else:
print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'02')
else:
if MM == 12:
print(str(YYYY+1)+'/'+'01'+'/'+'02')
else:
print(str(YYYY)+'/'+str(MM+1).zfill(2)+'/'+'02')
tktk