結果
| 問題 | No.3264 岩井数 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-06 15:15:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 645 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 95,584 KB |
| 実行使用メモリ | 84,864 KB |
| 最終ジャッジ日時 | 2026-07-14 20:59:25 |
| 合計ジャッジ時間 | 6,049 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 7 TLE * 1 -- * 22 |
ソースコード
def ip():return int(input())
def mp():return map(int, input().split())
def lmp():return list(map(int, input().split()))
# 岩プロコン2 F No.3264 岩井数
N = ip()
i = 1000
M = 10**9
K = [1]
for j in range(1100):
K.append(K[-1] * 10 % N)
# print(K[:10])
while True:
ip = i % N
si = str(i)
si_ = si[::-1]
i_ = int(si_)
ip_ = i_ % N
ti = int(si + si_ + '9')
L = len(si)
if L >= 5 and (ip * K[L+1] % N + ip_ * 10 % N + 9) % N == 0:
print(ti)
exit()
for j in range(10):
ti = int(si + str(j) + si_ + '9')
if (ip * K[L+2] % N + j * K[L+1] % N + ip_ * 10 % N + 9) % N == 0:
print(ti)
exit()
i += 1