結果
問題 |
No.3157 Nabeatsu
|
ユーザー |
|
提出日時 | 2025-06-18 21:10:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 357 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,368 KB |
最終ジャッジ日時 | 2025-06-18 21:10:17 |
合計ジャッジ時間 | 6,024 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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 T=S[:i] T+='2' for j in range(len(S)-i-1): T+='9' S=T 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