-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAntonandPolyhedrons.java
More file actions
34 lines (33 loc) · 867 Bytes
/
AntonandPolyhedrons.java
File metadata and controls
34 lines (33 loc) · 867 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
import java.util.*;
public class AntonandPolyhedrons {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
int ans=0;
while(t--!=0)
{
String s=sc.next();
switch (s) {
case "Tetrahedron":
ans+=4;
break;
case "Cube":
ans+=6;
break;
case "Octahedron":
ans+=8;
break;
case "Dodecahedron":
ans+=12;
break;
case "Icosahedron":
ans+=20;
break;
default:
break;
}
}
System.out.println(ans);
sc.close();
}
}