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)
选项(单选)
答案解析
详细答案解析为会员权益,按每日次数查看。
开通 / 升级会员