You are not logged in. Please login at www.codechef.com to post your questions!

×

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

asked 20 Aug, 11:44

godboledevansh's gravatar image

2★godboledevansh
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • 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, 11:44

question was seen: 53 times

last updated: 20 Aug, 11:44