POJ1002--487-3279 翻译

487-3279
Time Limit: 2000MSMemory Limit: 65536K
Total Submissions: 252679Accepted: 44972
Description

Description


Businesses like to have memorable telephone numbers. 
公司都喜欢容易记的电话号码
One way to make a telephone number memorable is to have it spell a memorable word or phrase. 
一个是号码易记的方法是把他写成易记的单词或词组
For example, you can call the University of Waterloo by dialing the memorable TUT-GLOP. 
比如,你给滑铁卢大学打电话时可以拨打TUT-GLOP
Sometimes only part of the number is used to spell a word. 
有时只有一部分数字可以被拼成单词
When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. 
当你晚上回到酒店,你可以拨打310-GINO从Gino's订披萨。
Another way to make a telephone number memorable is to group the digits in a memorable way.
另一种方法是对数字分组
 You could order your pizza from Pizza Hut by calling their ``three tens'' number 3-10-10-10. 
你可以通过拨打“三个十”号码3-10-10-10从必胜客订披萨


The standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (e.g. 888-1200). 
标准的电话号码格式有7位数字,其中第三个第四位直接有连字符(e.g. 888-1200)
The keypad of a phone supplies the mapping of letters to numbers, as follows: 
电话键盘提供了一种字母到数字的映射,关系如下
A, B, and C map to 2 
D, E, and F map to 3 
G, H, and I map to 4 
J, K, and L map to 5 
M, N, and O map to 6 
P, R, and S map to 7 
T, U, and V map to 8 

W, X, and Y map to 9 



There is no mapping for Q or Z. 
Q和Z没有映射关系
Hyphens are not dialed, and can be added and removed as necessary. 
根据需要可以添加或删除连字符
The standard form of TUT-GLOP is 888-4567, 
TUT-GLOP 的标准格式是888-4567
the standard form of 310-GINO is 310-4466, 
 310-GINO的标准格式是310-4466
and the standard form of 3-10-10-10 is 310-1010. 
 3-10-10-10的标准格式是310-1010


Two telephone numbers are equivalent if they have the same standard form. (They dial the same number.) 
如果两个号码有相同的标准格式,那么这两个号码相同


Your company is compiling a directory of telephone numbers from local businesses. 
你的工作正在编写一个当地企业的电话本
As part of the quality control process you want to check that no two (or more) businesses in the directory have the same telephone number. 

作为质量控制的一部分,你需要检查电话本里是否有两个或多个企业的号码相同



Input


The input will consist of one case. 
The first line of the input specifies the number of telephone numbers in the directory (up to 100,000) as a positive integer alone on the line. 
第一行输入一个正数,指定号码的数量
The remaining lines list the telephone numbers in the directory, with each number alone on a line.
接下来列出所有号码,每个号码占一行
 Each telephone number consists of a string composed of decimal digits, uppercase letters (excluding Q and Z) and hyphens. 
每个号码是一个由数字,大写字母(除Q,Z)和连字符组成的字符串
Exactly seven of the characters in the string will be digits or letters. 
一个字符串恰有7个数字或字母字符



Output


Generate a line of output for each telephone number that appears more than once in any form. 
每个重复出现的号码产生一行输出
The line should give the telephone number in standard form, followed by a space, followed by the number of times the telephone number appears in the directory.
这一行输出这个号码的标准格式,接着是一个空格,然后是号码出现的次数
 Arrange the output lines by telephone number in ascending lexicographical order. 
号码按字典序升序输出
If there are no duplicates in the input print the line: 
如果没有重复号码,在一行输出
No duplicates. 




Sample Input

12 

4873279 

ITS-EASY 

888-4567 

3-10-10-10 

888-GLOP 

TUT-GLOP 

967-11-11 

310-GINO 

F101010 

888-1200 -4-8-7-3-2-7-9- 487-3279 

Sample Output

310-1010 2 

487-3279 4 

888-4567 3

Source

转载于:https://www.cnblogs.com/ikaze/p/5140082.html

你可能感兴趣的:(POJ1002--487-3279 翻译)