您当前的位置: 首页 >  川川菜鸟 蓝桥杯

蓝桥杯每日一练:A+B问题

川川菜鸟 发布时间:2022-01-18 12:44:44 ,浏览量:4

一、题目

问题描述
  Given two integers A and B, your task is to output their sum, A+B.
输入格式
  The input contains of only one line, consisting of two integers A and B. (0 ≤ A,B ≤ 1 000)
输出格式
  The output should contain only one number that is A+B.
样例输入
1 1
样例输出
2

二、代码

a,b=map(int,input().split())  # 将输入的数字转化为int类型
print(a+b)

运行:

也可以:

a=int(input())
b=int(input())
print(a+b)

运行:

三、视频讲解

蓝桥杯比赛python组视频教程

关注
打赏
查看更多评论

川川菜鸟

暂无认证

  • 4浏览

    0关注

    897博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录