CODECRAFT LEVEL FOUR |
|
|
Problem 1: Most of you have probably tried to type an SMS message on the keypad of a cellular phone. It is sometimes very annoying to write longer messages, because one key must be usually pressed several times to produce a single letter. It is due to a low number of keys on the keypad. Typical phone has twelve keys only (and maybe some other control keys that are not used for typing). Moreover, only eight keys are used for typing 26 letters of an English alphabet. The standard assignment of letters on the keypad is shown in the left picture: |
|
|
|
|
Input: The first line of the input contains a single integer T - a number of test cases. Each of the next T lines contains two integers separated by a single space - A and B. Make a program that reads a number as input and prints the equivalent text as output. In case if the user needs to enter two characters displayed in the same key ,he uses a # in between. Assume that the text contains only lower case letters
Problem 2: The Okurkons Family Beside Tonik Okurkon, the head of the family, you will also meet his pretty wife Juliet, young son Tonicek and little daughter Amalka.
Mince (Coins) Tonik's grandmother was very thrifty and she stored all her savings into golden coins. Before she died she had divided these coins among her grandchildren so Tonik has one of his grandmother's golden coins. In order not the coin to be alone had Tonik several imitations made. The imitations were made so perfectly that it is impossible to say wheter the coin is fake or genuine just by having a look. That's why it was necessary to keep the genuine coin separated from the fake ones.
|
|
|
Copyright 2009.©Noesis 2009 All rights reserved. |
|
UPDATES |
|
-Learner Guided for Ecotecture is availabel here. |
SPONSORS |
![]() |