結果
問題 |
No.3157 Nabeatsu
|
ユーザー |
|
提出日時 | 2025-06-18 20:49:26 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 445 ms |
コンパイル使用メモリ | 82,348 KB |
実行使用メモリ | 83,984 KB |
最終ジャッジ日時 | 2025-06-18 20:49:32 |
合計ジャッジ時間 | 5,601 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 TLE * 1 -- * 34 |
ソースコード
N=int(input()) while True: change=False S=str(N) for i in range(len(S)): if S[i]=='3': change=True T=S[:i] U=S[i:] UU=int(U) UU-=1 S=T+str(UU) #S[i]='2' #for j in range(i+1,len(S)): #S[i]='9' break N=int(S) if N%3==0: change=True N-=1 if change==False: print(N) break