题解 | 小红的密码修改
小模拟
#include<bits/stdc++.h>
using namespace std;
int main(){
int _;
cin>>_;
while(_--){
string now;
cin>>now;
int xiao=0;
int da=0;
int shu=0;
int zi=0;
for(auto i:now){
if(i<='z'&&'a'<=i){
xiao++;
}
else if('A'<=i&&i<='Z')da++;
else if('0'<=i&&i<='9')shu++;
else zi++;
}
int zong=0;
if(xiao==1)zong+=25;
else zong+=xiao*65;
if(da==1)zong+=25;
else zong+=da*65;
if(shu==1)zong+=9;
else zong+=shu*65;
if(zi==1)zong+=3;
else zong+=zi*65;
cout<<zong<<"\n";
}
}
360集团公司福利 438人发布