All submissions for this problem are available.
Elliot has a habit of saving all his data in an encrypted format! Good for you, Elliot! But this time his computer has ran into some problem, and he needs your help.
He usually saves all his data in a key-value pair type. For example, if the world is ellioooottt, it will be saved as eil2o4t3. That is an alphabet and a number if the alphabet is repeated or just the alphabet if it is not repeated.Also the final encrypted string will have alphabetically ordered characters. So given a list of words, encrypt it all for him!
The first line of input contains one integer T denoting the number of test cases. The next T lines contains string S which is to be encrypted. All the letters will be lowercase!
OUTPUTFor each test case output the encrypted string in a new line.
1< T < 50
10 < S <50
|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, SCALA, 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, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions