fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int i, k, b;
  8. cin >> k;
  9. i = 0;
  10. string corp;
  11.  
  12. for(b = 1; b <= k; b ++)
  13. {
  14. cin >> corp;
  15. if(corp == "Tetrahedron")
  16. i = i + 4;
  17. else if(corp == "Cube")
  18. i = i + 6;
  19. else if(corp == "Octahedron")
  20. i = i + 8;
  21. else if(corp == "Dodecahedron")
  22. i = i + 12;
  23. else if(corp == "Icosahedron")
  24. i = i + 20;
  25. }
  26.  
  27. cout << i;
  28. return 0;
  29. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Standard output is empty