Skip to content

Commit f00e298

Browse files
committed
simple implementation
1 parent 2076cb5 commit f00e298

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

A_Anton_and_Polyhedrons.cpp

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
////https://codeforces.com/contest/266/problem/A
2+
#include <bits/stdc++.h>
3+
using namespace std;
4+
typedef long long ll;
5+
const int mod = 1e9 + 7;
6+
const int N = 1e5 + 5;
7+
8+
void solve()
9+
{
10+
int n;
11+
cin >> n;
12+
int total = 0;
13+
for (int i = 0; i < n; i++)
14+
{
15+
string s;
16+
cin >> s;
17+
18+
if (s == "Tetrahedron")
19+
{
20+
total = total + 4;
21+
}
22+
else if (s == "Cube")
23+
{
24+
total = total + 6;
25+
}
26+
else if (s == "Octahedron")
27+
{
28+
total = total + 8;
29+
}
30+
else if (s == "Dodecahedron")
31+
{
32+
total = total + 12;
33+
}
34+
else if (s == "Icosahedron")
35+
{
36+
total = total + 20;
37+
}
38+
}
39+
cout << total << endl;
40+
}
41+
42+
int main()
43+
{
44+
ios_base::sync_with_stdio(0);
45+
cin.tie(0);
46+
solve();
47+
}

A_Bit.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const int N = 1e5 + 5;
77

88
void solve()
99
{
10-
1110
int n;
1211
cin >> n;
1312
vector<string> str(n);

input.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
8
2-
12
31
1
4-
2
5-
3
6-
1434
7-
2024
8-
20000000
2+
++X

0 commit comments

Comments
 (0)