hdoj 1089~1096 八道简单A+B问题 (JAVA)
来源:互联网 发布:招赢 大数据总监 编辑:程序博客网 时间:2024/05/21 21:38
1089
Sample Input
1 5
10 20
Sample Output
6
1092
Sample Input
1 5
10 20
Sample Output
6
30
import java.util.*;import java.math.*;import java.io.*;public class Main1 {public static void main(String[] args) {// TODO Auto-generated method stubScanner in = new Scanner(System.in);while(in.hasNext()){int a,b;a=in.nextInt();b=in.nextInt();int c;c=a+b;System.out.println(c);}}}
1090
Sample Input
Sample Input
21 510 20
Sample Output
630
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);while(in.hasNext()){ int n; n=in.nextInt(); for(int i=0;i<n;i++) { int a,b; a=in.nextInt(); b=in.nextInt(); int c; c=a+b; System.out.println(c); }} }}1091
1 510 200 0
Sample Output
630
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);while(in.hasNext()){ int a,b; a=in.nextInt(); b=in.nextInt(); if(a==0&&b==0) { break; } else { System.out.println(a+b); }} }}
1092
Sample Input
4 1 2 3 45 1 2 3 4 50
Sample Output
1015
import java.util.*;import java.io.*;import java.math.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);int n;while(in.hasNext()){ n=in.nextInt(); if(n!=0) { int b=0;for(int i=0;i<n;i++){ int a; a=in.nextInt(); b=b+a;}System.out.println(b); }} }}1093
Sample Input
24 1 2 3 45 1 2 3 4 5
Sample Output
1015
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);int n;n=in.nextInt();for(int i=0;i<n;i++){ int m; m=in.nextInt(); int b=0; for(int c=0;c<m;c++) { int a; a=in.nextInt(); b=b+a; } System.out.println(b);} }}1094
Sample Input
4 1 2 3 45 1 2 3 4 5
Sample Output
1015
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);while(in.hasNext()){ int n; n=in.nextInt(); int b=0; for(int i=0;i<n;i++) { int a; a=in.nextInt(); b=b+a; } System.out.println(b);} }}1095
Sample Input
1 510 20
Sample Output
630
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in = new Scanner(System.in);while(in.hasNext()){ int a,b; a=in.nextInt(); b=in.nextInt(); int c; c=a+b; System.out.println(c); System.out.println( );} }}1096
Sample Input
34 1 2 3 45 1 2 3 4 53 1 2 3
Sample Output
10156
import java.util.*;import java.math.*;import java.io.*;public class Main { public static void main(String[] args) { // TODO Auto-generated method stubScanner in =new Scanner(System.in);while(in.hasNext()){ int n; n=in.nextInt(); for(int i=1;i<=n;i++) { int a; a= in.nextInt(); int c; c=0; for(int t=0;t<a;t++) { int b; b=in.nextInt(); c=c+b; } System.out.println(c); if(i!=n) { System.out.println( ); } }} }}
1 0
- hdoj 1089~1096 八道简单A+B问题 (JAVA)
- hdoj 2033 A+B简单的问题
- HDOJ A+B 问题
- 【hdoj】A + B Problem II(java)
- hdoj简单题目(八)
- A+B问题(java)
- HDOJ-1089 Calculate a + b
- 还是A+B(HDOJ)
- **火星A+B(HDOJ)
- HDOJ 1002 A + B Problem II(java)
- HDOJ-1002 A + B Problem II 高精度(java)
- 【大数问题】 HDOJ 1753 大明A+B
- HDOJ 2057A + B Again十六进制问题
- HDOJ 2075 A|B? 整除问题
- HDOJ 1089-1096 A+B for Input-Output Practice
- A*算法的简单实现(八数码问题)
- HDOJ 1002 A + B Problem II(大数A+B)
- HDOJ 1002 A + B Problem II(大数A+B)
- drawCircle、drawArc
- Machine Learning - Advice for Applying ML: Evaluating a hypothesis
- 【GDOI2016 模拟3.20】dierti
- 【BAT】win7下对批量文件重命名(截取原始文件名中的部分作新名字)
- java基础(21)--java.io.Serializable浅析
- hdoj 1089~1096 八道简单A+B问题 (JAVA)
- hdu 1723(简单dp)
- 读取文件
- 第四次C++作业
- 每天一个linux命令:ln 命令
- win8下命令行解决Socket Error10048:Adress already in use问题
- 简单的UDP通信的例子
- 与文件管理相关的系统调用 lseek fstat stat lstat
- qt类型转换