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.
Input
First line of input contains an integer t (1 <= t <= 100).
Each test case contains an integer n (1 <= n <= 10^18).
Output
For every test case print the n-th manku word on separate line.
Example
Input: 5 10 4 16 17 31 Output: mu k nm na mmm
hide comments
roy_24:
2016-07-29 18:55:38
some good test cases ?
|
|
Deepak :
2016-07-04 14:26:46
removed it from the todo list after a very longtime..AC ;) |
|
fly_sky12:
2016-06-22 11:09:04
thanks @deepak1228 :) |
|
deepak1228:
2016-06-10 13:33:39
make ur own pow function due to boundary limit of type conversion |
|
akshayvenkat:
2016-06-01 14:26:28
a month ago had no clue on how to solve this.
|
|
Rishabh:
2015-12-31 15:29:41
easy one .....ac in 1st go......
|
|
thedictator:
2015-12-07 13:51:00
extremely easy one.....AC in 1st attempt:) |
|
Siddharth Singh:
2015-12-03 13:14:59
Loved It,Just Be Sure Of The 1st Test Case ;) |
|
aloochaat1998:
2015-12-03 12:22:33
gets accepted by simple brute force!!!:D |
|
shantanu tripathi:
2015-09-01 22:40:41
easy if u get the logic :) |
Added by: | Mayank Tuteja |
Date: | 2013-01-17 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
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 guile SCM qobi SED ST TCL WHITESPACE |
Resource: | similar to codechef's lucky number |