测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A61018. 阅读以下 Python 代码,下列说法正确的是?( )1 n = int(input())

单选题

题目描述

阅读以下 Python 代码,下列说法正确的是?( )

1 n = int(input())
2
3 def is_palindrome(s):
4  return s == s[::-1]
5
6 max_palindrome = 0
7 for i in range(10 ** (n - 1), 10 ** n):
8  for j in range(i, 10 ** n):
9   product = i * j
10   if is_palindrome(str(product)) and product > max_palindrome:
11    max_palindrome = product
12 print(max_palindrome)

选项(单选)