青珹 @ 2018-06-09 18:58:23
闲得无聊写的(我太菜啦!)
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
char a[20],b[20],c[20],d[20],e[20],f[20];
int num[20],top=0;
void find(char c[]){
int l=strlen(c);
if(l==1){
if(c[0]=='a'){
num[++top]=1;
return ;
}
}
if(l==3){
if(c[0]=='o'&&c[1]=='n'&&c[2]=='e'){
num[++top]=1;
return ;
}
if(c[0]=='t'&&c[1]=='w'&&c[2]=='o'){
num[++top]=4;
return ;
}
if(c[0]=='s'&&c[1]=='i'&&c[2]=='x'){
num[++top]=36;
return ;
}
if(c[0]=='t'&&c[1]=='e'&&c[2]=='n'){
num[++top]=0;
return ;
}
return ;
}
if(l==4){
if(c[0]=='n'&&c[1]=='i'&&c[2]=='n'&&c[3]=='e'){
num[++top]=81;
return ;
}
if(c[0]=='f'&&c[1]=='o'&&c[2]=='u'&&c[3]=='r'){
num[++top]=16;
return ;
}
if(c[0]=='f'&&c[1]=='i'&&c[2]=='v'&&c[3]=='e'){
num[++top]=25;
return ;
}
if(c[0]=='b'&&c[1]=='o'&&c[2]=='t'&&c[3]=='h'){
num[++top]=4;
return ;
}
return ;
}
if(l==5){
if(c[0]=='t'&&c[1]=='h'&&c[2]=='r'&&c[3]=='e'&&c[4]=='e'){
num[++top]=9;
return ;
}
if(c[0]=='s'&&c[1]=='e'&&c[2]=='v'&&c[3]=='e'&&c[4]=='n'){
num[++top]=49;
return ;
}
if(c[0]=='e'&&c[1]=='i'&&c[2]=='g'&&c[3]=='h'&&c[4]=='t'){
num[++top]=64;
return ;
}
if(c[0]=='f'&&c[1]=='i'&&c[2]=='r'&&c[3]=='s'&&c[4]=='t'){
num[++top]=1;
return ;
}
if(c[0]=='t'&&c[1]=='h'&&c[2]=='i'&&c[3]=='r'&&c[4]=='d'){
num[++top]=9;
return ;
}
return ;
}
if(l==6){
if(c[0]=='e'&&c[1]=='l'&&c[2]=='e'&&c[3]=='v'&&c[4]=='e'&&c[5]=='n'){
num[++top]=21;
return ;
}
if(c[0]=='t'&&c[1]=='w'&&c[2]=='e'&&c[3]=='l'&&c[4]=='v'&&c[5]=='e'){
num[++top]=44;
return ;
}
if(c[0]=='t'&&c[1]=='w'&&c[2]=='e'&&c[3]=='n'&&c[4]=='t'&&c[5]=='y'){
num[++top]=0;
return ;
}
if(c[0]=='s'&&c[1]=='e'&&c[2]=='c'&&c[3]=='o'&&c[4]=='n'&&c[5]=='d'){
num[++top]=4;
return ;
}
return ;
}
if(l==7){
if(c[0]=='f'&&c[1]=='i'&&c[2]=='f'&&c[3]=='t'&&c[4]=='e'&&c[5]=='e'&&c[6]=='n'){
num[++top]=25;
return ;
}
if(c[0]=='s'&&c[1]=='i'&&c[2]=='x'&&c[3]=='t'&&c[4]=='e'&&c[5]=='e'&&c[6]=='n'){
num[++top]=56;
return ;
}
if(c[0]=='a'&&c[1]=='n'&&c[2]=='o'&&c[3]=='t'&&c[4]=='h'&&c[5]=='e'&&c[6]=='r'){
num[++top]=1;
return ;
}
return ;
}
if(l==8){
if(c[0]=='t'&&c[1]=='h'&&c[2]=='i'&&c[3]=='r'&&c[4]=='t'&&c[5]=='e'&&c[6]=='e'&&c[7]=='n'){
num[++top]=69;
return ;
}
if(c[0]=='f'&&c[1]=='o'&&c[2]=='u'&&c[3]=='r'&&c[4]=='t'&&c[5]=='e'&&c[6]=='e'&&c[7]=='n'){
num[++top]=96;
return ;
}
if(c[0]=='e'&&c[1]=='i'&&c[2]=='g'&&c[3]=='h'&&c[4]=='t'&&c[5]=='e'&&c[6]=='e'&&c[7]=='n'){
num[++top]=24;
return ;
}
if(c[0]=='n'&&c[1]=='i'&&c[2]=='n'&&c[3]=='e'&&c[4]=='t'&&c[5]=='e'&&c[6]=='e'&&c[7]=='n'){
num[++top]=61;
return ;
}
return ;
}
if(l==9){
if(c[0]=='s'&&c[1]=='e'&&c[2]=='v'&&c[3]=='e'&&c[4]=='n'&&c[5]=='t'&&c[6]=='e'&&c[7]=='e'&&c[8]=='n'){
num[++top]=19;
return ;
}
return ;
}
}
int main(){
cin>>a>>b>>c>>d>>e>>f;
find(a);
find(b);
find(c);
find(d);
find(e);
find(f);
sort(a+1,a+top+1);
bool b=1;
for(int i=1;i<=top;i++){
if(num[i]!=0)
b=0;
if(num[i]==0&&b==1)
continue ;
if(num[i]<10&&i!=1)
cout<<"0";
cout<<num[i];
}
if(b==1)
cout<<"0";
return 0;
}
by 不到前10不改名 @ 2018-06-09 19:05:46
%%%
by magical @ 2018-06-09 19:06:34
by strangers @ 2018-06-09 19:25:24
%%%
by 向大神们问好 @ 2018-06-09 19:32:14
e
by miserExist @ 2018-06-15 17:11:01
%
by 蒟蒻lxy @ 2018-06-22 20:26:09
by 蒟蒻lxy @ 2018-06-22 20:31:14
O on
--|-- orz
/ \ OTZ