Python超时求助

P1217 [USACO1.5] 回文质数 Prime Palindromes

```python a, b = map(int, input().split()) i = a if i <= 2: print(2) i = 3 if i % 2 == 0: i = i + 1 while i <= b: is_prime = True for o in range(2, int(i ** 0.5) + 2): if i % o == 0: is_prime = False break if is_prime and str(i) == str(i)[::-1]: print(i) i = i + 2 ```
by gghvcchb @ 2024-02-16 15:53:37


|