首页 > 试题广场 >

牛牛学加法

[编程题]牛牛学加法
  • 热度指数:26255 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 256M,其他语言512M
  • 算法知识视频讲解
\hspace{15pt}给定两个整数 ab,其中 0 \leqq a, b \leqq 1000,请计算它们的和并输出结果。

输入描述:
\hspace{15pt}在一行中输入两个整数 a, b0 \leqq a, b \leqq 1000)。


输出描述:
\hspace{15pt}输出一个整数,表示 a+b 的值。
示例1

输入

1 2

输出

3

说明

1+2=3,输出结果为 3
示例2

输入

1000 0

输出

1000

说明

1000+0=1000,输出结果为 1000
a, b = map(int, (input().split()))
print (a + b)
发表于 2025-07-13 03:14:49 回复(0)
print(sum([int(num) for num in input().split(' ')]))
发表于 2025-06-26 21:37:13 回复(0)
# a,b = map(int,input().split())
# sums = a+b
# print(sums)

print(sum(map(int,input().split())))

发表于 2024-09-27 01:19:31 回复(0)
a, b = map(int, input().split())
print(a + b)

发表于 2022-08-11 10:43:02 回复(0)
x = input()
a,b = x.split()
print(int(a)+int(b))

发表于 2022-07-17 15:43:15 回复(0)

问题信息

上传者:牛客301599号
难度:
6条回答 3069浏览

热门推荐

通过挑战的用户

查看代码
牛牛学加法