結果
問題 |
No.721 Die tertia (ディエ・テルツィア)
|
ユーザー |
![]() |
提出日時 | 2020-04-18 22:45:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 710 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-10-04 00:28:41 |
合計ジャッジ時間 | 1,533 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 1 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() S=[4,6,9,11] S=set(S) 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)