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

6876번 - Snow Calls 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB16713811580.420%

문제

You've been snowed in at your summer residence. And without the Internet! Unfortunately, this means you're going to have rely on using the phone to get what you need to survive: pizza, pop, and the latest video games.

Often times, companies replace the digits in their phone numbers with characters to make their phone numbers more memorable. Because apparently, it's easier to remember 416-BUY-MORE than it is to remember 416-289-6673. Some companies even add extra digits or characters (like 604-PIZZABOX) but any digits after the 10th are irrelevant.

Since it's getting tedious to do the conversion by hand, write a program to help change all the phone numbers in your phone book to the form xxx-xxx-xxxx, using the below image to assist you.

입력

Input consists of a series of test cases. The first line consists of an integer t, the number of test cases. Following this are t lines consisting of alpha-numeric characters separated by hyphens, representing valid phone numbers. No line is longer than 40 characters.

출력

For each test case, output the phone number in the form xxx-xxx-xxxx to the screen.

제한

예제 입력 1

5
88-SNOW-5555
519-888-4567
BUY-MORE-POP
416-PIZZA-BOX
5059381123

예제 출력 1

887-669-5555
519-888-4567
289-667-3767
416-749-9226
505-938-1123

힌트

출처

Olympiad > Canadian Computing Competition & Olympiad > 2005 > CCC 2005 Senior Division 1번

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

출처

대학교 대회

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

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