#include <stdio.h>
#include <string.h>
struct MyStruct
{
char ID[];
char Password[];
bool changed;
};
int main()
{
int n,i,j;
MyStruct User[];
while(scanf("%d",&n)!=EOF)
{
for(i=;i<n;i++)
User[i].changed=false;
int count = ;
for(i=;i<n;i++)
{
getchar();
scanf("%s %s",User[i].ID,User[i].Password);
int fir=;
for(j=;j<strlen(User[i].Password);j++)
{ if(User[i].Password[j]==''||User[i].Password[j]==''||User[i].Password[j]=='l'||User[i].Password[j]=='O')
{
if(fir)
{
fir=;
++count;
}
if(User[i].Password[j]=='') User[i].Password[j]='@';
else if(User[i].Password[j]=='') User[i].Password[j]='%';
else if(User[i].Password[j]=='l') User[i].Password[j]='L';
else if(User[i].Password[j]=='O') User[i].Password[j]='o';
User[i].changed=true;
} }
} if(count>)
{
printf("%d\n",count);
for(i=;i<n;i++)
if(User[i].changed)
printf("%s %s\n",User[i].ID,User[i].Password);
}
else
{
if(n==) printf("There is 1 account and no account is modified\n");
else printf("There are %d accounts and no account is modified\n",n);
}
}
return ;
}

1035 Password (20)的更多相关文章

  1. PAT 甲级 1035 Password (20 分)(简单题)

    1035 Password (20 分)   To prepare for PAT, the judge sometimes has to generate random passwords for ...

  2. PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1035 Password (20 分) 凌宸1642 题目描述: To prepare for PAT, the judge someti ...

  3. 【PAT】1035. Password (20)

    题目:http://pat.zju.edu.cn/contests/pat-a-practise/1035 分析:简单题.直接搜索,然后替换,不会超时,但是应该有更好的办法. 题目描述: To pre ...

  4. PAT甲级——1035 Password (20分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  5. 1035 Password (20)(20 point(s))

    problem To prepare for PAT, the judge sometimes has to generate random passwords for the users. The ...

  6. PAT Advanced 1035 Password (20 分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  7. PAT (Advanced Level) Practice 1035 Password (20 分)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  8. 1035 Password (20分)(水)

    To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem ...

  9. PAT甲题题解-1035. Password (20)-水

    题意:给n个用户名和密码,把密码中的1改为@,0改为%,l改为L,O改为o. 让你输出需要修改密码的用户名个数,以及对应的用户名和密码,按输入的顺序.如果没有用户需要修改,则输出对应的语句,注意单复数 ...

随机推荐

  1. Android(java)学习笔记84:自定义异常类

    自定义异常: 考试成绩必须在0-100之间 很明显java没有对应的异常,需要我们自己来做一个异常 自定义异常 继承自Exception 继承自RuntimeException 下面是一个代码示例: ...

  2. AngularJs学习经验汇集

    >>关于ng-include 有时候你会发现你用这个指令想要加载某个模板总是加载不出来,url明明是对的,页面还是一片空白,这里有一个细节要注意以下: <div ng-include ...

  3. Adobe Edge Animate –弹性的方块-使用tweenmax缓动效果

    Adobe Edge Animate –弹性的方块-使用tweenmax缓动效果 版权声明: 本文版权属于 北京联友天下科技发展有限公司. 转载的时候请注明版权和原文地址. 此前有Edge爱好者提出一 ...

  4. CF Two Buttons (BFS)

    Two Buttons time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...

  5. 【模拟】UVa 12108 - Extraordinarily Tired Students

    When a student is too tired, he can't help sleeping in class, even if his favorite teacher is right ...

  6. mac下的常用操作

    打开 应用程序(command+shift+A)-实用工具-终端 open .    直接打开Macintosh系统目录 其他口令(与linux一样)ls                显示当前目录内 ...

  7. 编程计算int类型整数的最大值和最小值

    方法一:将一个int类型整数不断加1,加到最大值,再加1,就变成负值(最小值) 最大值就是除最高位外,其余位都为1,-1即是所有位全部是1,右移1位后最高位变0   最小值即是最高位为1,其余位为0, ...

  8. MySqlDataReader在Using中使用

    结论:当DataReader放在Using方法中时,会自动释放资源,如果中途出现了异常处理,也同样会释放掉占用的资源.测试过程:这里由于没有将全部分过程记录下来,只是对结果大体的说明一下,有兴趣的童鞋 ...

  9. Linux 命令 - scp: 远程文件拷贝

    scp 与普通的文件复制命令 cp 类似,而它们之间最大的差别在于 scp 命令的源或目标文件是远程文件. 命令格式 scp [options] [[user@]host1:]file1 ... [[ ...

  10. Nginx - Additional Modules, About Your Visitors

    The following set of modules provides extra functionality that will help you find out more informati ...