Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92758 | 繁昌校区 | 2020 | Python3 | Wrong Answer | 33 MS | 3744 KB | 511 | 2024-10-06 13:46:18 |
def is_double_digit_repeated_year(year): # 将年份转换为字符串 year_str = str(year) # 获取前两个和后两个字符 first_half = year_str[:2] second_half = year_str[2:] # 检查两半是否相等 if first_half == second_half: return "YES" else: return "NO" # 读取输入年份 year = int(input("请输入一个4位整数年份: ")) # 输出结果 print(is_double_digit_repeated_year(year))
------Input------
2121
------Answer-----
YES
------Your output-----