阅读以下Python 代码,下列说法正确的是?()n = int(input()) def is_palindrome(s): return s == s[::-1] max_palindrome = 0 for i in range(10 ** (n - 1), 10 ** n): for j in range(i, 10 ** n): product = i * j if is_palindrome(str(product)) and product > max_palindrome: max_palindrome = product print(max_palindrome)
A. 找出所有n 位数
B. 找出由两个n 位数相乘得到的最大回文数
C. 找出所有回文数
D. 计算两个n 位数乘积的最大值
正确答案:B
试卷来源:202603 CCF-GESP编程能力等级认证Python四级真题