给你两个整数,要求输出这两个整数的和
输入两个整数 a, b (0 <= a, b <= 1000)
输出一个整数.
1 2
3
a, b = input().split() print(int(a)+int(b))
class Plus(): def plus_two(self): try: str_1 = input() a,b = str_1.split(' ') print(int(a) + int(b)) except Exception as e: pass finally: pass if __name__ == '__main__': Plus().plus_two()
print(sum(map(int,input().split())))
l = input().split() print(int(l[0])+int(l[1]))
a,b = map(int,input().split()) print(a+b)
a, b = map(int,input().split()) print(a+b)
a,b = map(eval,input().split()) print(a+b)
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题