问题标题: 酷町堂:1350 手机密码(phone)

0
0

0
已采纳
赵毅恒
赵毅恒
资深守护
资深守护

可以用字符串,

俗话说的好,暴力出奇迹,我就是暴力100

if(str[i]==' ')
        sum+=1;
        if(str[i]=='a')
        sum+=1;
        if(str[i]=='b')
        sum+=2;
        if(str[i]=='c')
        sum+=3;
        if(str[i]=='d')
        sum+=1;
        if(str[i]=='e')
        sum+=2;
        if(str[i]=='f')
        sum+=3;
        if(str[i]=='g')
        sum+=1;
        if(str[i]=='h')
        sum+=2;
        if(str[i]=='i')
        sum+=3;
        if(str[i]=='j')
        sum+=1;
        if(str[i]=='k')
        sum+=2;
        if(str[i]=='l')
        sum+=3;
        if(str[i]=='m')
        sum+=1;
        if(str[i]=='n')
        sum+=2;
        if(str[i]=='o')
        sum+=3;
        if(str[i]=='p')
        sum+=1;
        if(str[i]=='q')
        sum+=2;
        if(str[i]=='r')
        sum+=3;
        if(str[i]=='s')
        sum+=4;
        if(str[i]=='t')
        sum+=1;
        if(str[i]=='u')
        sum+=2;
        if(str[i]=='v')
        sum+=3;
        if(str[i]=='w')
        sum+=1;
        if(str[i]=='x')
        sum+=2;
        if(str[i]=='y')
        sum+=3;
        if(str[i]=='z')
        sum+=4;

0
0
0
0
我要回答