SHARE
TWEET

Untitled

a guest Aug 21st, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top