結果
| 問題 |
No.491 10^9+1と回文
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2024-04-11 13:31:21 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 213 ms / 1,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 134 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 19,468 KB |
| 最終ジャッジ日時 | 2024-10-02 21:35:02 |
| 合計ジャッジ時間 | 24,464 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 103 |
ソースコード
N=int(input())
se=set()
for x in range(1,10):
se.add(x)
for n in range(1,10**4):
se.add(int(str(n)+str(n)[::-1]))
for x in range(10):
se.add(int(str(n)+str(x)+str(n)[::-1]))
ans=0
for n in se:
if n*(10**9+1)<=N:
ans+=1
print(ans)
vwxyz