1.1.2A+B for Input-Output Practice (II)
A+B for Input-Output Practice (II)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 25709 Accepted Submission(s): 16910
Problem Description
Your task is to Calculate a + b.
Input
Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.
Sample Input
2
1 5
10 20
Sample Output
6
30
import java.util.Scanner;
public class Main { public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0){
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(a+b);
} sc.close(); } }
1.1.2A+B for Input-Output Practice (II)的更多相关文章
- PHP-FPM-failed to ptrace(PEEKDATA) pid 123: Input/output error
If you're running PHP-FPM you can see these kind of errors in your PHP-FPM logs. $ tail -f php-fpm.l ...
- NFS挂载异常 mount.nfs: Input/output error
[root@localhost ~]# vi /etc/exports #增加/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async) [r ...
- BIOS(Basic Input/Output System)是基本输入输出系统的简称
BIOS(Basic Input/Output System)是基本输入输出系统的简称 介绍 操作系统老师说,平时面试学生或者毕业答辩的时候他都会问这个问题,可见这个问题对于计算机专业的学生来说是如此 ...
- read()、write()返回 Input/output error, Device or resource busy解决
遇到的问题,通过I2C总线读.写(read.write)fs8816加密芯片,报错如下: read str failed,error= Input/output error! write str fa ...
- Angular 个人深究(三)【由Input&Output引起的】
Angular 个人深究(三)[由Input&Output引起的] 注:最近项目在做别的事情,angular学习停滞了 1.Angular 中 @Input与@Output的使用 //test ...
- Docker 在转发端口时的这个错误Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3306:tcp:172.17.0.2:3306: input/output error.
from:https://www.v2ex.com/amp/t/463719 系统环境是 Windows 10 Pro,Docker 版本 18.03.1-ce,电脑开机之后第一次运行 docker ...
- dpdk EAL: Error reading from file descriptor 23: Input/output error
执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...
- html5 填表 表单 input output 与表单验证
1.<output> Js计算结果 <form oninput="res.value = num1.valueAsNumber*num2.valueAsNumber ...
- mount_cd9660:/dev/acd0: Input/output error
mount -t cd9660 /dev/acd0 /cdrom g_vfs_done():acd0[READ(offset32768, length=204]error =5 mount_cd966 ...
随机推荐
- Error: Checksum mismatch.
bogon:bin macname$ brew install go ==> Downloading https://homebrew.bintray.com/bottles-portable- ...
- jekins 实现Django项目的自动部署(ubuntu16.04,python2.7,django1.11)
1.依赖的插件 如果插件下载失败 更换源 http://mirror.xmission.com/jenkins/updates/current/update-center.json 因为我们只需要构建 ...
- shell 字符串提取数字
echo "2014年7月21日" | tr -cd "[0-9]" 这样就可以提取出2014721
- Windows10中注册 regsvr32 xxx.ocx报错but the call to DIIRegisterServer failed with error code 0x80040200
网站中有读取居民身份证的机器,需要安装一些注册activeX控件然后进入指定目录下执行以下命令regsvr32 xxx.ocx报了个错: but the call to DIIRegisterServ ...
- Ubuntu 的 desktop 和 server 还是有区别。
除了安装的包,比如 GUI, LAMP 上有差别之外,所用的内核也稍有不一样. 不过desktop可以通过安装 sudo apt-get install linux-image-server 之后,编 ...
- [转]UTF-8网页中的头部部分多出一行空白
最近做php开发,我自己的习惯都是用utf-8编码,有时候却在网页顶部多了一个空白行,甚至引起了式样的错乱,后来google到这么一篇文 章,彻底解决问题UTF-8的BOM问题通常情况下,使用Wind ...
- vs2010打包安装
[WinForm] VS2010发布.打包安装程序(超全超详细) 2017年02月17日 21:47:09 y13156556538 阅读数:16487更多 个人分类: C#winform 1. ...
- Spring Cloud常用组件介绍
一.Eureka (Netfix下) 云端服务发现,一个基于 REST 的服务,用于定位服务,以实现云端中间层服务发现和故障转移. 二.Spring Cloud Config (Spring下) 配置 ...
- android------2018 年初值得关注的 16 个新 Android 库和项目
1. transitioner Transitioner 是一个为两个拥有嵌入子视图的视图之间提供简便.动态且可调整的动画效果的库.它纯 100% 使用 Kotlin 编写而成,使用 MIT 许可,且 ...
- Confluence 6 为站点禁用匿名用户访问
希望为你的站点禁用匿名用户的访问,取消选择 可以使用(can use)前面的选择框,然后选择 保存所有(Save All).这时候,用户应该禁止访问你的站点直达这些用户登录你的 Confluence ...