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

川川菜鸟

暂无认证

  • 2浏览

    0关注

    969博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

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

一、题目

问题描述   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组视频教程

关注
打赏
1665165634
查看更多评论
立即登录/注册

微信扫码登录

0.2952s