Describe
There are many coder, handsome want to know whether they are the most comprehensive strength of the coder. handsome like handsome, so he chose the handsome and programming level as the selection criteria. Each student's comprehensive score is a handsome degree score with a programming level score. He wants you to write a program to help him.
-
- Input
-
- There are multiple groups of data.
Enter a number n, representing the total number of participants in the accounting.
Next there are n rows, with a number of two in a row, a, B.
Where a represents the level of programming of the students, B represents the degree of handsome students.
n=0 Indicates the end of the input.
-
- Output
-
One
- row for each group of data, output the highest scores of all the students in the composite.
-
- Sample input
-
-
59 107 111 65 73 527 37 60
-
- Sample output
-
1913
1 ImportJava.util.Scanner;2 3 Public classMain {4 Public Static voidMain (string[] args) {5Scanner scanner=NewScanner (system.in);6 intN;7 inti;8 intMax;9 intA;Ten intb; One A while(true){ -n=scanner.nextint (); - the if(n==0) - Break; - -Max=0; + for(i=0;i<n;i++){ -A=scanner.nextint (); +b=scanner.nextint (); A at if(a+b>max) -max=a+b; - } - System.out.println (max); - } - } in}
Who is the best coder