Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <algorithm>
- #include <vector>
- #include <string>
- #include <set>
- using namespace std;
- int main () {
- int n, ans = 0;
- cin >> n;
- while (n--) {
- string s;
- cin >> s;
- switch (s[0]) {
- case 'T':
- ans += 4;
- break;
- case 'C':
- ans += 6;
- break;
- case 'O':
- ans += 8;
- break;
- case 'D':
- ans += 12;
- break;
- case 'I':
- ans += 20;
- break;
- }
- }
- cout << ans << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement