#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
int i,j,n;
char name[1002][12],pwd[1002][12];
char ansname[1002][12],anspwd[1002][12];
int cnt=0,mark;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%s %s",name[i],pwd[i]);
mark=0;
for(j=0;pwd[i][j]!='\0';j++){
if(pwd[i][j]=='1') {pwd[i][j]='@';mark=1;}
else if(pwd[i][j]=='0') {pwd[i][j]='%';mark=1;}
else if(pwd[i][j]=='l') {pwd[i][j]='L';mark=1;}
else if(pwd[i][j]=='O') {pwd[i][j]='o';mark=1;}
}
if(mark){
strcpy(ansname[cnt],name[i]);
strcpy(anspwd[cnt],pwd[i]);
cnt++;
}
}
if(cnt==0){
if(n==1) printf("There is 1 account and no account is modified\n");
else printf("There are %d accounts and no account is modified\n",n);
}else{
printf("%d\n",cnt);
for(i=0;i<cnt;i++){
printf("%s %s\n",ansname[i],anspwd[i]);
}
}
system("pause");
return 0;
}
浙大PAT 1035题 1035. Password
最新推荐文章于 2021-02-06 19:11:20 发布