結果
| 問題 |
No.3157 Nabeatsu
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-18 20:47:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 478 bytes |
| コンパイル時間 | 694 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2025-06-18 20:47:38 |
| 合計ジャッジ時間 | 5,393 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / 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