肖大神 @ 2016-06-24 13:34:55
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<cstdio>
using namespace std;
int in[10],tim;
int panduan(string a){
int k=a.size();
for(int i=0;i<k;i++)
a[i]=tolower(a[i]);
if(a=="one"||a=="a"||a=="first"||a=="another")return 1;
if(a=="two"||a=="both"||a=="second")return 2;
if(a=="three"||a=="third") return 3;
if(a=="four")return 4;
if(a=="five")return 5;
if(a=="six")return 6;
if(a=="seven")return 7;
if(a=="eight")return 8;
if(a=="nine")return 9;
if(a=="ten")return 10;
if(a=="eleven")return 11;
if(a=="twelve")return 12;
if(a=="thirteen")return 13;
if(a=="fourteen")return 14;
if(a=="fifteen")return 15;
if(a=="sixteen")return 16;
if(a=="seventeen")return 17;
if(a=="eighteen")return 18;
if(a=="nineteen")return 19;
if(a=="twenty")return 20;
return 0;
}
int main(){
freopen("123.in","r",stdin);
for(int i=0;i<6;i++){
string a;
cin>>a;
in[tim]=panduan(a);
if(in[tim])
tim++;
}
for(int i=0;i<tim;i++){
in[i]=in[i]*in[i];
in[i]%=100;
}
sort(in,in+tim);
cout<<tim;
for(int i=0;i<tim;i++){
if(in[i]==0)
continue;
if(i>0&&in[i]<10)
cout<<0;
cout<<in[i];
}
return 0;
}
by 美国队长熊 @ 2016-06-24 13:51:27
他测试点太高了吧
by JayJoker @ 2016-06-24 21:16:47
.......
by 加油吧骚年 @ 2016-06-25 16:58:47
。。。。。。
by 启人zhr @ 2016-06-25 20:52:49
第三个点输出0
by inspiration @ 2016-06-26 15:15:34
可以打表的嘛= =