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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章