-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathantonshape.java
More file actions
35 lines (29 loc) · 891 Bytes
/
antonshape.java
File metadata and controls
35 lines (29 loc) · 891 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
import java.util.*;
public class antonshape {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
String arr[] = new String[a];
int count = 0;
for (int i = 0; i < a; i++) {
arr[i] = sc.next();
if (arr[i].equals("Icosahedron")) {
count = 20 + count;
}
if (arr[i].equals("Cube")) {
count = 6 + count;
}
if (arr[i].equals("Tetrahedron")) {
count = 4 + count;
}
if (arr[i].equals("Dodecahedron")) {
count = 12 + count;
}
if (arr[i].equals("Octahedron")) {
count = 8 + count;
}
}
System.out.println(count);
sc.close();
}
}