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 ...
随机推荐
- python 将16进制转为字节
数值为:0xFD >>> x="FD" >>> x.decode('hex') '\xfd'
- Cassandra学习笔记
CASSANDRA在工作中用过,但是用的项目少,能用却了解的不全面.今天来稍加学习下: http://zqhxuyuan.github.io/2015/10/15/Cassandra-Daily/ ...
- Spring AMQP 源码分析 08 - XML 配置
### 准备 ## 目标 通过 XML 配置文件使用 Spring AMQP ## 前置知识 <Spring AMQP 源码分析 07 - MessageListenerAdapter> ...
- indexedDB入门
localforage localStorage局限性:存储容量限制,仅支持字符串,如果是存对象还需要将使用JSON.stringify和JSON.parse方法互相转换:读取都是同步的.大多数情况o ...
- npm 用 淘宝代理
1.先强制清缓存 npm cache clean --force 2.运行的npm的指令走的淘宝代理 npm install -g cnpm --registry=https://registry. ...
- WPF自定义控件的两种方式
方法A: 第一步:My自定义控件:Control 第二步:针对 “My自定义控件” 类型,编写<style>或<模板>(UI的外观完全由用户自己定义) 第三步: 使用My自定 ...
- English trip V1 - 4.Do you have it? Teacher:Patrick Key: have - has doesn't have
In this lesson you will learn to describe what you have. STARTER Do you have a ...? # 你有...吗? car b ...
- Nginx配置https, 80端口重定向443
server { listen 443 ssl; server_name 域名; charset utf-8; access_log /var/log/nginx/webhook.iminho.me/ ...
- Perfect Groups CodeForces - 980D
链接 题目大意: 定义一个问题: 求集合$S$的最小划分数,使得每个划分内任意两个元素积均为完全平方数. 给定$n$元素序列$a$, 对$a$的所有子区间, 求出上述问题的结果, 最后要求输出所有结果 ...
- 字 字节 比特,以及各个算数类型所占用的大小范围 c++
字 储存的基本单元,. 1字=4/8字节 字节 byte 字节是计算机中数据处理的基本单元. 1byte=8bit 比特(bit/位) 表示二进制位,计算机内部数据储存的最小单位 例如 1011是一个 ...