結果
問題 |
No.491 10^9+1と回文
|
ユーザー |
|
提出日時 | 2022-05-30 02:12:08 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 269 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 76,288 KB |
最終ジャッジ日時 | 2024-09-21 00:46:23 |
合計ジャッジ時間 | 10,262 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | MLE * 3 |
other | MLE * 103 |
ソースコード
def is_palindrome(x): s = str(x) l = len(s) if s[:l//2] == s[::-1][:l//2]: return True else: return False N = int(input()) M = 10**9+1 ans = 0 for i in range(1, 10**5): if is_palindrome(i) and M*i <= N: ans += 1 print(ans)