結果
| 問題 | No.491 10^9+1と回文 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-05-30 02:12:08 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 269 bytes |
| 記録 | |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 85,084 KB |
| 実行使用メモリ | 80,908 KB |
| 最終ジャッジ日時 | 2026-04-09 09:03:46 |
| 合計ジャッジ時間 | 7,344 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)