結果
問題 |
No.3157 Nabeatsu
|
ユーザー |
|
提出日時 | 2025-06-18 20:52:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 507 bytes |
コンパイル時間 | 1,530 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2025-06-18 20:52:51 |
合計ジャッジ時間 | 4,539 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 RE * 15 |
ソースコード
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=2 for j in range(len(S)-i-1): U=U*10+9 S=T+str(U) #S[i]='2' #for j in range(i+1,len(S)): #S[i]='9' break #print(S) N=int(S) if N%3==0: change=True N-=1 if change==False: print(N) break