cccckick @ 2024-10-26 15:00:07
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main()
{
map<string,int>a={
{"one",1},{"two",2},{"third",3},{"four",4},{"five",5},{"six",6},{"seven",7},{"eight",8},{"nine",9},{"ten",10},{"eleven",11},{"twelve",12},{"thirteen",13},{"fourteen",14},{"fifteen",15},{"sixteen",16},{"seventeen",17},{"eighteen",18},{"nineteen",19},{"twenty",20},
{"anothor",1} };
vector<int>b;
string str;
string sum;
for(int i=0;i<6;i++)
{
cin>>str;
if(a.count(str))
{
a[str]=(int)pow(a[str],2)%100;
b.push_back(a[str]);
}
}
sort(b.begin(),b.end());
for(auto it:b)
sum+=to_string(it);
int i=0;
while(sum[i]=='0')
{
sum.erase(i,1);
i++;
}
cout<<sum;
}
by cccckick @ 2024-10-27 15:02:41
已经解决