結果
問題 | No.491 10^9+1と回文 |
ユーザー | takakin |
提出日時 | 2020-08-03 23:29:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 244 ms / 1,000 ms |
コード長 | 220 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-13 17:37:33 |
合計ジャッジ時間 | 28,021 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)