标签:style blog ar color os sp java for on
描述
5
9 10
7 11
1 6
5 7
3 5
2
7 3
7 6
0
19
13
1 import java.util.Scanner; 2 3 public class Main { 4 public static void main(String[] args) { 5 Scanner scanner=new Scanner(System.in); 6 int n; 7 int i; 8 int max; 9 int a; 10 int b; 11 12 while(true){ 13 n=scanner.nextInt(); 14 15 if(n==0) 16 break; 17 18 max=0; 19 for(i=0;i<n;i++){ 20 a=scanner.nextInt(); 21 b=scanner.nextInt(); 22 23 if(a+b>max) 24 max=a+b; 25 } 26 System.out.println(max); 27 } 28 } 29 }
标签:style blog ar color os sp java for on
原文地址:http://www.cnblogs.com/zqxLonely/p/4133210.html