Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rextester
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.io.*; import java.util.*; import java.lang.*; class Rextester { private static List<Integer> li = new ArrayList<Integer>(); public static void main(String args[]) throws IOException { //System.out.println("Hello, World!"); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t=Integer.parseInt(br.readLine()); //ArrayList<Long> li = new ArrayList<Long>(); //ArrayList<ArrayList<Integer>> li = new ArrayList<ArrayList<Integer>>(); while(t-->0){ StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); String map = br.readLine(); int ans = a+b; li.add(ans); } for(int i=0;i<li.size();i++) System.out.println(li.get(i)); } }
run
|
edit
|
history
|
help
0
4c
Sum of EVEN and ODD nubmers (11 grade)
predecrement
4d
on_off
PE #12
Problem_rstring
combination sum (variation)
1.5
String Class Methods