結果

問題 No.3264 岩井数
ユーザー suna127
提出日時 2025-09-10 09:43:05
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 309 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 82,268 KB
実行使用メモリ 83,012 KB
最終ジャッジ日時 2025-09-10 09:43:11
合計ジャッジ時間 5,400 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other AC * 7 TLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

s = 10 ** 9 // N
while True:
    if N * s >= 10 ** 9 and N * s % 10 == 9:
        break
    s += 1

def ok(x):
    if x % 10 != 9:
        return False
    xx = str(x)[:-1]
    return xx == xx[::-1]

for i in range(s, s + 10 ** 10, 10):
    if ok(N * i):
        print(N * i)
        exit()
0