Logo
(追記) (追記ここまで)

34365번 - Sarah's Sandwich Shop 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB69503063.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:

2ドル$ A B C
3ドル$ D E F
4ドル$ G H I
5ドル$ J K L
6ドル$ M N O
7ドル$ P Q R S
8ドル$ T U V
9ドル$ W X Y Z

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.

제한

예제 입력 1

4
colorado
school
of
mines

예제 출력 1

26567236
724665
63
64637

예제 입력 2

2
GO
OREDIGGERS

예제 출력 2

46
6733444377

힌트

출처

School > CS@Mines > CS@Mines HSPC 2023 > Beginner D번

  • 문제를 만든 사람: Ethan Richards
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /