Codeforces 785A Anton and Polyhedrons

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/polanwind/article/details/83792579

啥也别说了,水就完事了。

今天看完数据库前三章。

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>

using namespace std;



int main() {
	int n;
	int ans=0;
	scanf("%d", &n);
	while (n--) {
		string s;
		cin >> s;
		if (s[0] == 'T') {
			ans += 4;
		}
		else if (s[0] == 'C') {
			ans += 6;
		}
		else if (s[0] == 'O') {
			ans += 8;
		}
		else if (s[0] == 'D') {
			ans += 12;
		}
		else {
			ans += 20;
		}
	}
	cout << ans << endl;
	//system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/polanwind/article/details/83792579