Advertisement
rengetsu

Codeforces_785A

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