結果
問題 |
No.3157 Nabeatsu
|
ユーザー |
|
提出日時 | 2025-06-18 21:14:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 528 bytes |
コンパイル時間 | 494 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 36,360 KB |
最終ジャッジ日時 | 2025-06-18 21:14:30 |
合計ジャッジ時間 | 6,355 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 TLE * 1 -- * 14 |
ソースコード
import sys sys.set_int_max_str_digits(1000001) S=input() while True: change=False X=len(S) for i in range(X): #print(9) if S[i]=='3': change=True lt=[S[:i]] lt.append('2') for j in range(len(S)-i-1): lt.append('9') S="".join(lt) break #print(S) #print(change) N=int(S) if N%3==0: change=True N-=1 S=str(N) if change==False: print(N) break