python 实现加法
2024-09-04 11:34:15
https://ac.nowcoder.com/acm/contest/338/G
链接:https://ac.nowcoder.com/acm/contest/338/G
来源:牛客网
题目描述
This is a very simple problem! Your only job is to calculate a + b + c + d!
输入描述:
There are several cases. In the first line, there is a single integer T.(T <= 200) In the next T lines, each line contains four integers a, b, c and d(-2^61 <= a,b,c,d <=2^61)
输出描述:
output T lines. Each line output one integer represent the answer of a + b + c + d
示例1
输出
10 不换行
n=int(input())
for i in range(n):
a,b,c,d = map(int,input().split())
print(a+b+c+d)
换行
n=int(input())
for i in range(n):
m=int(input())
a=int(input())
b=int(input())
c=int(input())
print(m+a+b+c)
多组输入
while True:
try:
print sum(map(int,raw_input().split()))
except:
break
最新文章
- Activiti系列:如何把Activiti工程转换为maven工程以解决依赖项找不到的问题
- HTTP长连接短连接
- Rails--default_scope
- visual studio 中删除多余的空白行
- json操作json类型转换
- Sumblime Text 2 常用插件以及安装方法
- 小程序敏感信息解密-java
- HBase基础之常用过滤器hbase shell操作(转)
- mysql 简称
- 转 edtools
- 怎样更新CentOS6.5的yum源
- 移除input框type=";number";在部分浏览器的默认上下按钮
- Java与.NET的WebServices相互调用
- 迁移到 Linux:使用 sudo | Linux 中国
- JSP技术复习
- POJ 1243
- Xcode真机调试报错:The application could not be verified.
- Spring学习(七)-----Spring Bean的5种作用域
- C#: 数字经纬度和度分秒经纬度间的转换
- 【Android 多媒体应用】使用MediaCodec解码使用AudioTrack播放音频数据
热门文章
- spl_autoload_register() 函数实现的自动加载
- yum软件包管理
- LinkedList与ArrayList的区别(内部实现)
- Python---基础---dict_tuple_set
- Java+Maven的工程运行Sonar的方式
- Docker Toolbox 学习教程【转载】
- vscode中执行gulp task的简便方法
- [NOIP2015]运输计划 题解
- [CSP-S模拟测试]:赛(贪心+三分)
- 阿里云code上传代码