Skip to content

Commit 11d8274

Browse files
committed
Added 785A - Anton and Polyhedrons.cpp
1 parent 3f5422a commit 11d8274

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

785A - Anton and Polyhedrons.cpp

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
// Code Written By: Vikash Patel
5+
6+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
7+
8+
int main()
9+
{
10+
int n;
11+
cin>>n;
12+
int tFaces=0;
13+
for(int i=0;i<n;i++)
14+
{
15+
string s;
16+
cin>>s;
17+
if(s[0]=='T')
18+
tFaces+=4;
19+
else if(s[0]=='C')
20+
tFaces+=6;
21+
else if(s[0]=='O')
22+
tFaces+=8;
23+
else if(s[0]=='D')
24+
tFaces+=12;
25+
else
26+
tFaces+=20;
27+
}
28+
cout<<tFaces<<endl;
29+
}

0 commit comments

Comments
 (0)