-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTea03.java
More file actions
28 lines (25 loc) · 764 Bytes
/
Tea03.java
File metadata and controls
28 lines (25 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package algorithm.huawei;
import java.util.Scanner;
/**
* @Author: eric
* @Date: 2022/4/23 11:45 上午
*/
public class Tea03 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int m = in.nextInt();
int minCost = 0;
for (int i = 0; i < m; i++) {
while (in.hasNext()) {
int jqNum = in.nextInt();
for (int j = 0; j < jqNum; j++) {
String bTime = in.next();
String jTime = in.next();
int i1 = Integer.parseInt(bTime) + Integer.parseInt(jTime);
minCost = Math.max(minCost, i1);
}
System.out.println(minCost);
}
}
}
}