a = a.split() b = [] for i in a: b.append(int(i)) print (sum(b)) //Java<br>import java.io.*; import java.util.*; public class Main { public static void main(String args[]) throws Exception { Scanner cin=new Scanner(System.in); int a=cin.nextInt(),b=cin.nextInt();...
import java.util.Scanner;public class Main{ public static void main(String[] args){ Scanner in=new Scanner(System.in);//默认分隔符为空格// int a=in.nextInt();int b=in.nextInt();System.out.println((a+b));} }
1importjava.io.*;2importjava.util.*;34publicclassMain {5publicstaticvoidmain(String[] args) {6Scanner cinScanner =newScanner(System.in);7inta =cinScanner.nextInt();8intb =cinScanner.nextInt();910System.out.println(a +b);11}12}
杭电oj: 1000 A + B Problem Java实现 A + B Problem import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNextInt()) { int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(a+b); ...
A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 474597 Accepted Submission(s): 91595 Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate ...
import java.io.*;import java.util.*;public class Main { public static void main(String args[]) throws Exception { Scanner cin=new Scanner(System.in);int a = cin.nextInt(), b = cin.nextInt();System.out.println(a+b);} } JavaScript (Node.js )const fs = require('fs')const data...
import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in);int a = cin.nextInt(), b = cin.nextInt();System.out.println(a + b);} } 用这个试试
杭电oj:A + B Problem II java实现 A + B Problem II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 474597 Accepted Submission(s): 91595 Problem Description I have a very simple problem for you. Given two integers A and B, your ...
常见的有棋盘覆盖和A+B问题,这类问题牵扯到的数值都比较大,如果用一般的数值类型,肯定输出不了,所以就要想一个办法,怎么把大数转换一下输出。 A+B Problem II 时间限制:3000 ms | 内存限制:65535 KB 难度:3 描述 I have a very simple problem for you. Given two integers A and B, your job is to...
A + B Problem II HDU - 1002 I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each...