算法-入门练习
前言
本人最近在练习算法题,准备蓝桥杯比赛,本人比较菜,看了网上很多题都没有python解法,就想着用博客来记录下自己学习的过程。本人将从最简单的题型开始,欢迎大家一起学习交流。
一:A + B Problem
描述
Calculate A + B.
输入
One line.
Each line will contain two integers A and B. Process to end of file.
输出
One line.
For each case, output A + B in one line.
输入样例 1
1 1
输出样例 1
2
提示
Only testing for first users.
这道题属于基本题,直接上代码
Python
a,b=map(int,input().split())
print(a+b)
下一篇,算法-分支结构