Skip to content

Commit 33960a7

Browse files
10.09.2025 12:11
1 parent c7d78c7 commit 33960a7

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

443A Anton and Letters.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
#include <set>
3+
#include <string>
4+
using namespace std;
5+
int main()
6+
{
7+
string s;
8+
set<char> st;
9+
getline(cin, s);
10+
for (char ch : s)
11+
{
12+
if (isalpha(ch))
13+
{
14+
st.insert(ch);
15+
}
16+
}
17+
cout << st.size() << endl;
18+
return 0;
19+
}

785A Anton and Polyhedrons.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main()
4+
{
5+
int n, c = 0;
6+
string s;
7+
cin >> n;
8+
for (int i = 0; i < n; i++)
9+
{
10+
cin >> s;
11+
if (s == "Tetrahedron")
12+
{
13+
c += 4;
14+
}
15+
else if (s == "Cube")
16+
{
17+
c += 6;
18+
}
19+
else if (s == "Octahedron")
20+
{
21+
c += 8;
22+
}
23+
else if (s == "Dodecahedron")
24+
{
25+
c += 12;
26+
}
27+
else
28+
{
29+
c += 20;
30+
}
31+
}
32+
cout << c << endl;
33+
return 0;
34+
}

0 commit comments

Comments
 (0)