結果
| 問題 | No.3157 Nabeatsu | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-05-23 20:04:02 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 186 bytes | 
| コンパイル時間 | 278 ms | 
| コンパイル使用メモリ | 82,620 KB | 
| 実行使用メモリ | 83,792 KB | 
| 最終ジャッジ日時 | 2025-05-23 20:04:07 | 
| 合計ジャッジ時間 | 4,688 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 TLE * 1 -- * 34 | 
ソースコード
N = int(input())
for i in range(N, 0, -1):
    num = [int(x) for x in str(i)]
    if num.count(3) > 0:
        continue
    if sum(num) % 3 == 0:
        continue
    print(i)
    break
            
            
            
        