結果
問題 |
No.491 10^9+1と回文
|
ユーザー |
![]() |
提出日時 | 2020-08-03 23:33:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 245 ms / 1,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-13 17:38:55 |
合計ジャッジ時間 | 27,617 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 103 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) nn=n//(10**9+1) ans=0 for i in range(1,10**5): if int(str(i)+str(i)[::-1])<=nn: ans+=1 if int(str(i)[:-1]+str(i)[::-1])<=nn: ans+=1 print(ans,end="\n")