Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n, ans;
- string s;
- int main(){
- cin >> n;
- for(int i = 0; i < n; i++){
- cin >> s;
- if(s == "Tetrahedron")
- ans += 4;
- else if(s == "Cube")
- ans += 6;
- else if(s == "Icosahedron")
- ans += 20;
- else if(s == "Dodecahedron")
- ans += 12;
- else if(s == "Octahedron")
- ans += 8;
- }
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement