Codeforces “ 785A – Anton and Polyhedrons” solution( Bangla ) | Cpp language

**Before watching this make sure that you’ve tried enough**

#include<iostream>
using namespace std;
int main()
{
    int a,count=0;
    cin>>a;
    string arr[a];
    for(int i=0; i<a; i++)
    {
        cin>>arr[i];
        if(arr[i]=="Tetrahedron")
        {
            count+=4;
        }
        else if(arr[i]=="Cube")
        {
            count+=6;
        }
        else if(arr[i]=="Octahedron")
        {
            count+=8;
        }
        else if(arr[i]=="Dodecahedron")
        {
            count+=12;
        }
        else if(arr[i]=="Icosahedron")
        {
            count+=20;
        }
    }
    cout<<count;
}

 

If this solution helped you, please share this with your friends.
And if you have anything to say, let me know in the comment section.

More solutions are coming so Like our Facebook page and Subscribe to our YouTube channel to stay connected.

Leave a Comment