| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 69 | 50 | 30 | 63.830% |
Sarah's Sandwiches is the hottest new restaurant Golden, and every student at Mines can't wait to try it. Like any reputable sandwich shop, they want a phone number that cleverly spells out a word or phrase so that customers can more easily recall their phone number.
The owners have a lot of ideas for what their phone number might spell out, but they're too busy making sandwiches to figure out the corresponding phone numbers which would be the most commercially viable.
You've been tasked to help them out, and create a program which converts a word to a telephone number using the standard keypad:
To perform the conversion, every character in the given word is mapped to the single corresponding digit in the same row of the table above. For example, the word "MINES" would be mapped to the phone number "64637ドル$" because the letter "M" maps to the digit "6ドル$", the letter "I" maps to the digit "4ドル$", the letter "N" maps to the digit "6ドル$", and so on.
The first line of input will be an integer 1ドル \leq N \leq 1,000円$ indicating the number of different words that the owners' of Sarah's Sandwiches are considering to use for their phone number. Each of the following $N$ lines contains a word of length 1ドル \le M \leq 45,ドル that consists only of upper and lowercase letters in the English alphabet (A-Z, a-z).
The output should contain $N$ lines with the $i^{th}$ line containing the phone number conversion of the $i^{th}$ word of the input.
Note that outputted phone numbers may not match the standard phone number length.
4 colorado school of mines
26567236 724665 63 64637
2 GO OREDIGGERS
46 6733444377
School > CS@Mines > CS@Mines HSPC 2023 > Beginner D번