人生苦短,我用python~
# a = int(input().strip())
# b = int(input().strip())
# print(a+b)
a = input().strip()
b = input().strip()
if len(a) > len(b):
b = "0" * (len(a)-len(b)) + b
else:
a = "0" * (len(b)-len(a)) + a
result_list = []
ord_0 = ord("0")
add_on = False
for each in range(len(a)):
atmp = ord(a[len(a)-each-1]) - ord_0
btmp = ord(b[len(b)-each-1]) - ord_0
result = atmp + btmp + add_on
if result >= 10:
add_on = True
else:
add_on = False
result %= 10
result_list.append(chr(result + ord_0))
if add_on:
result_list.append("1")
print("".join(reversed(result_list)))



京公网安备 11010502036488号