1. 程式人生 > >pat-advanced(1035-1038)

pat-advanced(1035-1038)

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:

3
Team000002 Rlsp0dfa
Team000003 perfectpwd
Team000001 R1spOdfa
Sample Output 1:
2
Team000002 RLsp%dfa
Team000001 [email protected]
Sample Input 2:
1
team110 abcdefg332
Sample Output 2:
There is 1 account and no account is modified
Sample Input 3:
2
team110 abcdefg222
team220 abcdefg333
Sample Output 3:
There are 2 accounts and no account is modified

相關推薦

pat-advanced(1035-1038)

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 sin

1038 Recover the Smallest Number (30 分)PAT (Advanced Level) Practice

1038 Recover the Smallest Number (30 分) Given a collection of number segments, you are supposed to recover the smallest number from them.

PAT (Advanced Level) Practice 1035 Password (20 分)(C++)(甲級)

1035 Password (20 分) To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are alw

1016. Phone Bills (25)——PAT (Advanced Level) Practise

eno algo can character period cti 內存 -s over 題目信息: 1016. Phone Bills (25) 時間限制 400 ms 內存限制 32000 kB 代碼長度限制 16000 B

1062. Talent and Virtue (25)【排序】——PAT (Advanced Level) Practise

net ddc addclass person tail follow acc either git 題目信息 1062. Talent and Virtue (25) 時間限制200 ms 內存限制65536 kB 代碼長度限制16000 B

1064. Complete Binary Search Tree (30)【二叉樹】——PAT (Advanced Level) Practise

function namespace his () 技術 androi sed tel evel 題目信息 1064. Complete Binary Search Tree (30) 時間限制100 ms 內存限制65536 kB 代碼長度限制

1069. The Black Hole of Numbers (20)【模擬】——PAT (Advanced Level) Practise

int exce 個人 esp ack ble sam namespace constant 題目信息 1069. The Black Hole of Numbers (20) 時間限制100 ms 內存限制65536 kB 代碼長度限制1600

Pat(Advanced Level)Practice--1026(Table Tennis)

ros turn card 沒有 use gb2312 [] ng- undefined Pat1026代碼 題目描寫敘述: A table tennis club has N tables available to the public. The

PAT 甲級 1035 Password

set ner with write inf pod lin strlen https https://pintia.cn/problem-sets/994805342720868352/problems/994805454989803520 To prepare fo

PAT (Advanced Level) Practice 1114 Family Property (25 分)

程式設計題 1114 Family Property (25 分) This time, you are supposed to help us collect the data for family-owned property. Given each per

PAT (Advanced Level) Practice 1107 Social Clusters (30 分)

  1107 Social Clusters (30 分) When register on a social network, you are always asked to specify your hobbies in order to find some

PAT (Advanced Level) Practice 1031 Hello World for U (20)(20 分)

程式設計題 1031 Hello World for U (20)(20 分) Given any string of N (>=5) characters, you are asked

PAT (Advanced Level) Practice 1027 Colors in Mars (20)(20 分)

程式設計題 1027 Colors in Mars (20)(20 分) People in Mars represent the colors in their computers in a

PAT (Advanced Level) Practice 1012 The Best Rank (25)(25 分)

程式設計題 1012 The Best Rank (25)(25 分) To evaluate the performance of

PAT 甲級1035 Password(模擬)

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 so

PAT乙級 1035 插入與歸併

根據維基百科的定義: 插入排序是迭代演算法,逐一獲得輸入資料,逐步產生有序的輸出序列。每步迭代中,演算法從輸入序列中取出一元素,將之插入有序序列中正確的位置。如此迭代直到全部元素有序。 歸併排序進行如下迭代操作:首先將原始序列看成 N 個只包含 1 個元素的有序子序列,然後每次迭代歸

PAT-Advanced Level-1001-Public Bike Management

PAT-Advanced Level-1001-Public Bike Management 題目連結:Public Bike Management 題目大意: 情景是總部對目標站點及路徑上的所有站點進行單車管理,規則是每個站點要有 Cmax/2 輛單車,求到目標站點最短路徑上需要

PAT-Advanced Level-1002-All Roads Lead to Rome

PAT-Advanced Level-1002-All Roads Lead to Rome 題目連結:All Roads Lead to Rome 題目大意: 除起點外每個頂點都有幸運值,尋找一條最短路徑到ROM(Rome),若存在多條路徑,找出其中幸運值總和最大的路徑,若總和相等

PAT (Advanced Level) Practice 1004 Counting Leaves (30 分)樹的層次遍歷

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each

PAT (Advanced Level) Practice 1054 The Dominant Color (20 分) map使用

Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color