結果
問題 | No.491 10^9+1と回文 |
ユーザー |
|
提出日時 | 2022-05-30 02:13:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 226 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-21 00:46:37 |
合計ジャッジ時間 | 13,969 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 85 WA * 18 |
ソースコード
def is_palindrome(x):s = str(x)l = len(s)if s[:l//2] == s[::-1][:l//2]:return Trueelse:return FalseN = int(input())M = 10**9+1ans = 0for i in range(1, 10**5):if is_palindrome(i) and M*i <= N:ans += 1print(ans)