1.1.1 A+B for Input-Output Practice (I)
A+B for Input-Output Practice (I)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 49573 Accepted Submission(s): 20282
Problem Description
Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners.
You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.
Input
The input will consist of a series of pairs 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
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);
while(sc.hasNext()){
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(a+b);
}
sc.close(); } }
1.1.1 A+B for Input-Output Practice (I)的更多相关文章
- 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 ...
- Input/output subsystem having an integrated advanced programmable interrupt controller for use in a personal computer
A computer system is described having one or more host processors, a host chipset and an input/outpu ...
随机推荐
- shell 基本操作小结
1.echo和if else fi命令 #!/bin/bash echo hello;echo there filename=demo.sh if [ -e "$filename" ...
- mark一下总是记混的重定向与转发的区别
forward内部跳转 和redirect重定向跳转的区别 1).从地址栏显示来说 forward是服务器请求资源,服务器直接访问目标地址的URL,把那个URL的响应内容读取过来,然后把这些内容再发 ...
- MAC下安装npm和node
Step1: 在官网下载适合mac的版本的nodejs,官网地址https://nodejs.org/en/ Step2: 上述方法我试了,但是不管用.安装完毕且重启均不能显示我安装的版本.哭 下面重 ...
- 《剑指offer》第三十四题(二叉树中和为某一值的路径)
// 面试题34:二叉树中和为某一值的路径 // 题目:输入一棵二叉树和一个整数,打印出二叉树中结点值的和为输入整数的所 // 有路径.从树的根结点开始往下一直到叶结点所经过的结点形成一条路径. #i ...
- 使用NativeExtension向AIR app 添加Activity和BroadCastReceiver(2)
开发: Android项目 新建一个针对NativeExtension的Android项目,实现相应的FREContext,FREExtension和FREFunction等方法,同时新建一个Acti ...
- union和union all比较说明
执行sql语句:select '1' union select '3' union select '2' union select '1' 得到的结果集如下: 执行sql语句如下: select ' ...
- eclipse wtp 没有自动生成 web.xml
因此,运行servlet 时出错了. 网上查了一下,好像说确实不会自动生成,但是运行应该没有问题的. 幸亏找到了手动生成web.xml的方法,也就不纠结了. http://crunchify.com/ ...
- 雷林鹏分享:C# 枚举(Enum)
C# 枚举(Enum) 枚举是一组命名整型常量.枚举类型是使用 enum 关键字声明的. C# 枚举是值数据类型.换句话说,枚举包含自己的值,且不能继承或传递继承. 声明 enum 变量 声明枚举的一 ...
- 『Scrapy』全流程爬虫demo
建立好的爬虫工程如下: item.py 它用来存储解析后的响应文件: # -*- coding: utf-8 -*- # Define here the models for your scraped ...
- iterator not dereferencable问题
STL中的迭代器总是出现各种问题,这个是我在打表达式求值时碰到的... 综合网上的答案,一般来说有两种情况: 第一:访问了非法位置. 一般来说可能在queue为空时取front(),rear(),或者 ...