-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAntonAndPolyhedrons.java
More file actions
28 lines (27 loc) · 917 Bytes
/
AntonAndPolyhedrons.java
File metadata and controls
28 lines (27 loc) · 917 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 Divisions.Div2.Round404;
//code by senurah
public class AntonAndPolyhedrons {
public static void main(String[] args) {
java.util.Scanner scanner = new java.util.Scanner(System.in);
int n = scanner.nextInt();
scanner.nextLine();
if(n>=1 && n<=200000){
int count =0;
for(int i =0;i<n;i++){
String line = scanner.nextLine();
if(line.equals("Tetrahedron")){
count+=4;
} else if (line.equals("Cube")) {
count+=6;
} else if (line.equals("Octahedron")) {
count+=8;
} else if (line.equals("Dodecahedron")) {
count+=12;
} else if (line.equals("Icosahedron")) {
count+=20;
}
}
System.out.println(count);
}
}
}