×

# FSTR - Editorial

 0 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 asked 20 Aug '18, 11:44 1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×5

question asked: 20 Aug '18, 11:44

question was seen: 58 times

last updated: 20 Aug '18, 11:44