A. Anton and Polyhedrons

直接统计+答案就可以了。

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#define maxn 1000
#define LL long long
using namespace std;

char s[10000];

int main()
{
    int n;
    LL sum=0;
    scanf("%d",&n);
    while (n--) {
        scanf("%s",s);
        if (s[0]=='T') sum+=4;
        if (s[0]=='C') sum+=6;
        if (s[0]=='O') sum+=8;
        if (s[0]=='D') sum+=12;
        if (s[0]=='I') sum+=20;
    }
    printf("%I64d\n",sum);
    return 0;
}
View Code

相关文章:

  • 2021-07-15
  • 2021-07-04
  • 2021-11-06
  • 2021-10-22
  • 2021-11-01
  • 2021-09-06
  • 2021-07-15
  • 2021-10-06
猜你喜欢
  • 2022-12-23
  • 2021-07-14
  • 2021-12-27
  • 2021-05-02
  • 2021-08-24
  • 2021-09-09
  • 2021-10-29
相关资源
相似解决方案