horiuchi #5552(2008/01/29 07:18 GMT) [ Java ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Sample137 { public static int sum(String[] input) { int sum = 0; for (String s: input) { sum += Integer.parseInt(s); } return sum; } public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); try { int s = sum(reader.readLine().split("\\s+")); int t = sum(reader.readLine().split("\\s+")); System.out.println(Math.max(s, t)); } catch (IOException ex) { ex.printStackTrace(); } } }
Rating0/0=0.00-0+
[ reply ]
horiuchi
#5552()
[
Java
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]