핸드폰 키패드

less than 1 minute read

DESCRIPTION

핸드폰의 국제표준 키매핑은 다음 그림과 같습니다.

The international standard letter/number mapping for telephones is shown as follows:

문자열 형태의 전화번호를 입력으로 받아, 올바른 전화번호로 변환해 주는 프로그램을 작성하세요. 입력으로 들어온 전화번호에 대소문자 형태의 알파벳이 포함되어 있다면 숫자로 변환 해주어야 합니다.

Write a test program that prompts the user to enter a phone number as a string. The input number may contain letters. The program translates a letter (uppercase or lowercase) to a digit and leaves all other characters intact.

INPUT

  • Line 1 : 테스트케이스 T (1~1,000)

  • Line 2 ~ T+1 : 공백이 포함되지 않은 전화번호(길이는 100을 넘지 않는다)

OUTPUT

  • Line 1 ~ T : 변환된 전화번호

SAMPLE INPUT

2
1-800-Flowers
1800flowers

SAMPLE OUTPUT

1-800-3569377
18003569377

Categories: ,

Updated:

Comments