Cody

# Problem 1127. Decrypt a secret message!

The crypto system in question is based on phone keyboard. We need two numbers in order to decrypt a word. First number represents relevant letters on a phone keyboard. We must sort all possible (meaningful or meaningless) string permutations. then select next number(th) word from this permutation list.

For example if input is [2 1];

there are three letters on phone keyboard '2' which is 'abc'. We sort this letters as {'a';'b';'c'} then select first one. Output is 'a'.

Another example if input is [2639 99]

output must be 'cody', since from all sorted possible string permutations with {'abc','mno','def','wxyz'} the 99th is 'cody'.

This one is related with Problem 1124

### Solution Stats

80.65% Correct | 19.35% Incorrect
Last solution submitted on Jan 25, 2016

Tags

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today