NYOJ题目596谁是最好的Coder
--------------------------------------------
AC代码:
1 import java.util.Scanner; 2 3 public class Main { 4 5 public static void main(String[] args) { 6 7 Scanner sc=new Scanner(System.in); 8 9 while(true){ 10 11 int n=sc.nextInt(); 12 if(n==0) return ; 13 int ans=sc.nextInt()+sc.nextInt(); 14 15 while(--n>0){ 16 int t=sc.nextInt()+sc.nextInt(); 17 ans=Math.max(t,ans); 18 } 19 20 System.out.println(ans); 21 } 22 23 } 24 25 }