Representative of Missing Letters
All submissions for this problem are available.
Representative of missing lettersProblem Statement : Rajan loves playing with strings. Every time he tries different manipulations on string to make his coding life more interesting. Today he wants to find missing alphabets from a given string and then their representative by adding missing alphabetic numbers and then doing modulo 26 operation. He wants to find solution as early as possible help him to find it. If nothing is missing then he simply wants that message. (Remember - Alphabetic number of a / A=1, b /B = 2, and so on ) Input Format : The first line contains T, number of test cases. The test cases are described over T subsequent lines in which, each line contains a string S. (String contains both lower case or upper case characters) Constraints : T Ranges from [1,100] |S| Ranges from [1,1000] Output Format : For each test case print the output in the form “String String_No Representative is = character”. (output character must be in lowercase form) If all alphabets are present then print "Nothing is missing" Sample Input : Input 1: 1 abcdeijklmpqrstuvz Input 2: 2 pQrSTuvwxyz aaaaaaaaaaaa Input 3: 1 abCDefghiJKlmnOPQRstUvwxYz Sample Output : Output 1: String 1 Representative is = r Output 2: String 1 Representative is = p String 2 Representative is = l Output 3: Nothing is missing Explanation : In Output 1 - missing letters are f,g,h,n,o,w,x,y (Uppercase or lowercase). Hence by doing their alphabetic sum and performing modulo 26 operation on that sum, and then converting result to its respective alphabet we can get letter r . In Output 2 - Their are two test cases In case 1 : missing characters are a, b, c, d, e, f, g, h, i, j, k, l, m, n, o (Uppercase or lowercase) hence by doing their alphabetic sum and performing modulo 26 operation on that sum, and then converting result to its respective alphabet we can get letter p . In case 2 : missing characters are all alphabets except “a”. Hence by doing alphabetic sum of missing characters and performing modulo 26 operation on that sum, and then converting result to its respective alphabet we can get letter l
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions