博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1035 Password (20 分)
阅读量:4608 次
发布时间:2019-06-09

本文共 2101 字,大约阅读时间需要 7 分钟。

1035 Password (20 分)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) from O (o in uppercase). One solution is to replace 1 (one) by @, 0 (zero) by %, l by L, and O by o. Now it is your job to write a program to check the accounts generated by the judge, and to help the juge modify the confusing passwords.

Input Specification:

Each input file contains one test case. Each case contains a positive integer N (1000), followed by N lines of accounts. Each account consists of a user name and a password, both are strings of no more than 10 characters with no space.

Output Specification:

For each test case, first print the number M of accounts that have been modified, then print in the following M lines the modified accounts info, that is, the user names and the corresponding modified passwords. The accounts must be printed in the same order as they are read in. If no account is modified, print in one line There are N accounts and no account is modified where N is the total number of accounts. However, if N is one, you must print There is 1 account and no account is modified instead.

Sample Input 1:

3Team000002 Rlsp0dfaTeam000003 perfectpwdTeam000001 R1spOdfa

Sample Output 1:

2Team000002 RLsp%dfaTeam000001 R@spodfa

Sample Input 2:

1team110 abcdefg332

Sample Output 2:

There is 1 account and no account is modified

Sample Input 3:

2team110 abcdefg222team220 abcdefg333

Sample Output 3:

There are 2 accounts and no account is modified
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;bool flag=false;struct Node{ char account[11]; char password[11];};void modify(Node &node){ int len=strlen(node.password); for(int i=0;i
qu; scanf("%d",&n); Node node[n]; for(int i=0;i

 

转载于:https://www.cnblogs.com/zhanghaijie/p/10327194.html

你可能感兴趣的文章
SQLCODE和SQLERRM .
查看>>
sql - sum() 和 count() 函数的区别
查看>>
linux mysql 安装(rpm)
查看>>
css类选择器类名覆盖优先级
查看>>
Linux常见命令
查看>>
函数的定义
查看>>
guess
查看>>
bootstrap以及考试复习
查看>>
android 中检查设备是否有网络可用
查看>>
linux磁盘命令-lsblk显现磁盘阵列分组
查看>>
vuex在页面中以对象展开运算符形式引入报错解决
查看>>
NET Remoting 示例
查看>>
文件系统典型实现方式
查看>>
20155207王雪纯 2006-2007-2 《Java程序设计》第1 周学习总结
查看>>
搭建jenkins集群node结点
查看>>
一个可收缩的panel
查看>>
ASP.NET IIS 支持PUT、DELETE请求
查看>>
网站建设中帝国cms如何循环调用栏目下级分类
查看>>
php对象的传递——“通过引用传递”or“传递的是object identifier”?
查看>>
windows(msvc)下编译boost库
查看>>