Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
79759 | 张智博 | 22数字最多的字符串 | Python3 | Accepted | 35 MS | 3760 KB | 345 | 2024-07-09 23:10:46 |
str1 = input() str2 = input() num_count1 = sum(1 for c in str1 if c.isdigit()) num_count2 = sum(1 for c in str2 if c.isdigit()) if num_count1 > num_count2: result = str2[::-1] + str1[num_count1 - 1] elif num_count2 > num_count1: result = str1[::-1] + str2[num_count2 - 1] else: result = str1[::-1] + str2[0] print(result)