FSTR - Editorial

Practice Link:
https://www.codechef.com/problems/FSTR

Contest Link:
https://www.codechef.com/COVI2018/problems/FSTR

DIFFICULTY:
Easy

PREREQUISITES:
Basic switch case or String array implementaion knowledge.

PROBLEM:
You are given a set of strings, your task is to print the integer sequence corresponding to each string.The character sequence encoding is taken from keypad phones and is as follows (a - “2”,b - “22”,c - “222”,d - “3”,e - “33”,f - “333”,g - “4” … x - “99”,y - “999”,z - “9999”).

EXPLANATION:

The problem is a type of simple character encoding in which there is a integer sequence corresponding to each alphabet (all in lower case, alphabets only).With the help of mentioned codes corresponding to characters
we can create a integer sequence corresponding to each input string.

One example can be seen as : Sting input - “hello” , output sequence : 4433555555666 (‘h’ - “44” + ‘e’ - “33” + ‘l’ - “555” + ‘l’ - “555”,‘o’ - “666”)

AUTHOR’S AND TESTER’S SOLUTIONS:

Author’s solution can be found here:
https://www.codechef.com/viewsolution/19804856

Tester’s solution can be found here:
https://www.codechef.com/viewsolution/19804740