MAY99_2 - Manku Word
Manku loves Codechef's Lucky Number and now he decided to start Manku words :)
Manku words are those words which have only letters 'm', 'a', 'n', 'k', 'u'.
Generally in english, 'a' comes before 'k', 'k' comes before 'm' and so on. But in Manku's dictionary, 'm' comes before 'a', 'a' comes before 'n', 'n' comes before 'k', 'k' comes before 'u'.
Thus according to manku
- 1st manku word is m
- 2nd manku word is a
- 3rd manku word is n
- 4th manku word is k
- 5th manku word is u
- 6th manku word is mm
- 7th manku word is ma
Your task is very simple. For given value of n, write the n-th manku word.
First line of input contains an integer t (1 <= t <= 100).
Each test case contains an integer n (1 <= n <= 10^18).
For every test case print the n-th manku word on separate line.
Input: 5 10 4 16 17 31 Output: mu k nm na mmm
AC in one go!!
refer to this link https://www.geeksforgeeks.org/find-excel-column-name-given-number/
create your own function named pow and use it, as power function doesnt hold good for very large values
AC in one go...
for those getting WA using fast input through getchar try using scanf because may be there are some white spaces in input fileLast edit: 2017-07-07 13:54:00
for past 2 hrs i was trying to find the incorrect thing in my code....and i came to know that problem was with pow function...wtf
good question to learn about type conversion
AC in one go! Didn't use pow() function. simple adhoc solution works.
|Added by:||Mayank Tuteja|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: ASM32 ASM64 GAWK BASH BF CSHARP C99 CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO HASK ICON ICK JS-RHINO LUA NEM NICE NODEJS OCAML PAS-GPC PIKE PRLG-swi RUBY SCALA SCM qobi SCM guile SED ST TCL WHITESPACE|
|Resource:||similar to codechef's lucky number|