-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGregWorkout.java
More file actions
26 lines (21 loc) · 819 Bytes
/
GregWorkout.java
File metadata and controls
26 lines (21 loc) · 819 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
/**
* Created by MalhotR1 on 05/16/2018.
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class GregWorkout {
public static void main(String[] args) throws IOException {
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int T = Integer.parseInt(br.readLine().trim());
String[] in = br.readLine().trim().split(" ");
int[] arr = new int[3];
for (int i = 0; i < T; i++) {
arr[i%3] += Integer.parseInt(in[i]);
}
if (arr[0] > arr[1] && arr[0] > arr[2]) System.out.println("chest");
else if (arr[1] > arr[0] && arr[1] > arr[2]) System.out.println("biceps");
else System.out.println("back");
}
}
}