結果
| 問題 |
No.491 10^9+1と回文
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-07-25 17:55:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 514 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-09 17:11:20 |
| 合計ジャッジ時間 | 5,647 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 42 WA * 61 |
ソースコード
n = int(input().strip())
ls = [
1000000001,
11000000011,
111000000111,
1111000001111,
11111000011111,
111111000111111,
1111111001111111,
11111111011111111,
111111111111111111,
]
total = 0
x_ = 0
for k in range(9, 0, -1):
for a in ls:
x = x_ + a
for _ in range(k):
if n > x:
total += 1
x += a
else:
print(total)
raise SystemExit
x_ += 111111111111111111
print(total)