-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC255A.java
More file actions
37 lines (27 loc) · 727 Bytes
/
Copy pathC255A.java
File metadata and controls
37 lines (27 loc) · 727 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
29
30
31
32
33
34
35
36
37
import java.io.*;
import java.util.*;
/**
* */
public class C255A {
/**
* @param args
*/
public static void main(String[] args) {
try{
BufferedReader reader =new BufferedReader(
new InputStreamReader(System.in));
int n=Integer.valueOf(reader.readLine().trim());
int[] r=new int[n];
String[] s=reader.readLine().trim().split(" ", n);
for(int i=0;i!=n;i++)
r[i]=Integer.valueOf(s[i].trim());
int[] counts=new int[3];
for(int i=0;i!=n;i++)
counts[i%3]+=r[i];
System.out.println(
((counts[0]>counts[1])&&(counts[0]>counts[2]))?"chest":
((counts[1]>counts[0])&&(counts[1]>counts[2]))?"biceps":"back");
reader.close();
}catch(Exception e){}
}
}