結果
問題 |
No.721 Die tertia (ディエ・テルツィア)
|
ユーザー |
![]() |
提出日時 | 2020-04-18 22:44:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 709 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-10-04 00:28:35 |
合計ジャッジ時間 | 1,741 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 5 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() S=[4,6,9,11] S=set() y,m,d=map(int,input().split("/")) l=0 if y%4==0: if y%100==0: if y%400==0: l=1 else: l=0 else: l=0 if m==2: if d+2>28+l: ans=str(y)+"/03/0"+str(d+2-28-l) else: ans=str(y)+"/02/"+(str(d+2).zfill(2)) elif m in S: if d+2>30: ans=str(y)+"/"+(str(m+1).zfill(2))+"/"+(str(d+2-30).zfill(2)) else: ans=str(y)+"/"+(str(m).zfill(2))+"/"+(str(d+2).zfill(2)) elif m==12 and d>=30: ans=str(y+1)+"/01/"+(str(d+2-31).zfill(2)) else: if d+2>31: ans=str(y)+"/"+(str(m+1).zfill(2))+"/"+(str(d+2-31).zfill(2)) else: ans=str(y)+"/"+(str(m).zfill(2))+"/"+(str(d+2).zfill(2)) print(ans)