RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00318

Mobitel

Unrated 레이팅 미적용
난이도
1s
시간 제한
32MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

\(2^{nd}\) round, November \(8^{th}\), 2014
Grasshopper Marko was jumping happily all over the meadow. He wasn’t being careful and his Nokia 3310 fell into
a puddle. His mobile phone is now acting funny! The contacts got wet and the keyboard works in a completely
unpredictable manner! All the numerical keys broke down. When we press one of them, the mobile phone acts as
if we pressed another key. Luckily, there are no two keys that are acting the same so Marko can still write
all the letters.
Grasshopper Marko was experimenting a bit and found out how each key acts. Now he wants to write a message
to his girlfriend. Since he is just a grasshopper, you will do that for him.
To all those who don’t remember how mobile phones with keys work, here is a short description.
1
2
3
abc
def
4
5
6
ghi
jkl
mno
7
8
9
pqrs
tuv
wxyz
*
0

Keyboard \(on\) \(a\) very old mobile phone.
The image shows keys with letters that we can get by pressing that key (on a working mobile phone that didn’t
fall into a puddle). For example, if we want to get letter ‘a‘ we will press key 2 once, and if we want letter ‘b‘ we
will press the key 2 twice. If we want to write two letters from the same key consecutively, we have to press the
pound key (‘#‘) exactly once. For example, if we want to write the string “klor“ we will press the keys in the
following order: “55#555666777“.

제약
입력 형식

The first line of input contains 9 integers. The first integer marks the behaviour of key ‘1‘, the second the behaviour
of key ‘2‘, the third the behaviour of key ‘3‘, and so on.
Marko is not using keys ‘*‘ and ‘0‘ because he is a grasshopper. Key ‘#‘ can’t get broken.
The second line of input contains a string consisting of only lowercase letters of the English alphabet. The length
of the word won’t exceed 100 characters.

출력 형식

The first and only line of output must contain the sequence of keys you need to press in order to write Marko’s
message.

예제 1
입력
2 3 4 5 6 7 8 9 1
klor
7 8 9 1 2 3 6 5 4
djevojka
9 8 7 6 5 4 3 2 1
skakavac
출력
output
output
44#444555666
68662227778#885
33335585582228#888
설명

Clarification of the first example: All of the keys are shifted one place to the right so the output differs a little bit from
the example in the task statement.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2014/2015 Contest 2

평가 및 의견

Mobitel

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Mobitel

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8