시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
5 초 512 MB 74 45 33 68.750%

문제

"전화번호가 뭐에요?"

"제 전화번호의 각 자리를 영어단어로 바꾸고, 철자를 잘 섞으면 OFFER EN NOXIOUS NEON OVERUSE가 나와요."

"예?"

"그리고 제 전화번호는 오름차순으로 정렬되어 있어요."

"..."

입력

첫 줄에 테스트케이스의 개수 T가 주어진다. 각 테스트케이스에는 상대방이 제시한 스트링 S가 주어진다. S는 영어 대문자로만 이루어져 있다.

1≤ T ≤ 100이고, S의 길이는 3 이상 2000 이하이다. 모든 테스트케이스에는 유일한 해답이 있다.

출력

각 줄에 테스트케이스 번호 x와 전화번호 y를 Case #x: y의 형태로 출력한다.

예제 입력 1

4
OZONETOWER
WEIGHFOXTOURIST
OURNEONFOE
ETHER

예제 출력 1

Case #1: 012
Case #2: 2468
Case #3: 114
Case #4: 3

힌트

ONE ONE ONE FOUR FOUR SIX SEVEN의 철자를 잘 배열하면 OFFERENNOXIOUSNEONOVERUSE가 나온다.

W3sicHJvYmxlbV9pZCI6IjE0MzcwIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjODA0XHVkNjU0XHViYzg4XHVkNjM4IFx1YzIxOFx1YzIxOFx1YWVkOFx1YjA3YyAoTGFyZ2UpIiwiZGVzY3JpcHRpb24iOiI8cD4mcXVvdDtcdWM4MDRcdWQ2NTRcdWJjODhcdWQ2MzhcdWFjMDAgXHViYjUwXHVjNWQwXHVjNjk0PyZxdW90OzxcL3A+XHJcblxyXG48cD4mcXVvdDtcdWM4MWMgXHVjODA0XHVkNjU0XHViYzg4XHVkNjM4XHVjNzU4IFx1YWMwMSBcdWM3OTBcdWI5YWNcdWI5N2MgXHVjNjAxXHVjNWI0XHViMmU4XHVjNWI0XHViODVjIFx1YmMxNFx1YWZiOFx1YWNlMCwgXHVjY2EwXHVjNzkwXHViOTdjIFx1Yzc5OCBcdWMxMWVcdWM3M2NcdWJhNzQgT0ZGRVIgRU4gT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aW5nIG9mIGRpZ2l0czogdGhlIHBob25lIG51bWJlci48XC9wPlxyXG4iLCJoaW50IjoiIiwib3JpZ2luYWwiOiIxIiwicHJvYmxlbV9sYW5nX2NvZGUiOiJcdWM2MDFcdWM1YjQifV0=

출처

Contest > Google Code Jam > Google Code Jam 2016 > Round 1B A2번

  • 문제를 번역한 사람: jh05013

채점

  • 예제는 채점하지 않는다.