Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int a,sum = 0;
  6. string s;
  7. cin>>a;
  8. for(int i=1;i<=a;i++)
  9. {
  10. cin>>s;
  11. if(s=="Tetrahedron") sum+=4;
  12. else if(s=="Cube") sum+=6;
  13. else if(s=="Octahedron") sum+=8;
  14. else if(s=="Dodecahedron") sum+=12;
  15. else if(s=="Icosahedron") sum+=20;
  16. }
  17. cout<<sum<<endl;
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement