2019牛客假日团队赛3 - New cow IDs

知识共享许可协议 版权声明:署名,允许他人基于本文进行创作,且必须基于与原先许可协议相同的许可协议分发本文 (Creative Commons

链接:https://ac.nowcoder.com/acm/contest/945/B
来源:牛客网

题目描述

Bessie’s bovine thought processes occasionally take her into mathematical realms unfathomed by her barn-mates.
She watched the cows walk by with their serial numbers (1 <= serial_number <= 999,999) on display. She thought perhaps the numbers might have more interesting properties if one calculated the sum of the number and the reverse of that number. Help her perform this calculation.
Here are some examples:
.
23 + 32 = 55
123 + 321 = 444
9730 + 379 = 10109

输入描述:

Line 1: A single integer that is the serial number to be transformed

输出描述:

Line 1: A single integer that is the transformed serial number

。。。。。。。。。

…AC Code(Python 大法好)

a = input()
print(int(a)+int(a[::-1]))

猜你喜欢

转载自blog.csdn.net/weixin_44090305/article/details/93598262
ids