Advertisement
askarulytarlan

Untitled

Mar 15th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int n, ans;
  6. string s;
  7. int main(){
  8. cin >> n;
  9. for(int i = 0; i < n; i++){
  10. cin >> s;
  11. if(s == "Tetrahedron")
  12. ans += 4;
  13. else if(s == "Cube")
  14. ans += 6;
  15. else if(s == "Icosahedron")
  16. ans += 20;
  17. else if(s == "Dodecahedron")
  18. ans += 12;
  19. else if(s == "Octahedron")
  20. ans += 8;
  21. }
  22. cout << ans;
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement