結果
問題 |
No.491 10^9+1と回文
|
ユーザー |
![]() |
提出日時 | 2023-06-15 04:01:06 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 352 bytes |
コンパイル時間 | 79 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 21,376 KB |
最終ジャッジ日時 | 2024-06-23 07:22:41 |
合計ジャッジ時間 | 4,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | TLE * 1 -- * 2 |
other | -- * 103 |
ソースコード
import sys input = sys.stdin.readline n=int(input()) count=0 for i in range(10**6+1): S=str(i) T=S+S[::-1] U=S+S[:-1][::-1] ANS=T+(9-len(T))*"0"+T[::-1] if 1<=int(ANS)<=n and int(ANS)%(10**9+1)==0: count+=1 ANS=U+(9-len(U))*"0"+U[::-1] if 1<=int(ANS)<=n and int(ANS)%(10**9+1)==0: count+=1 print(count)