Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

FACTORAD - Factoradic

For given number n your task is to print factoradic of n in decimal representation.

Input

The first line of the standard input contains one integer t (t<10001) which is the number of test cases.

In each of the next t lines there is one number n (n<1000000001).

Output

For each test, print factoradic of n in decimal representation.

Example

Input:
6
4600
10000
52608434
395033
1
1000000000
Output:
6212200
16512200
134861130100
1062342210
10
2105644512200


Added by:Piotr Kąkol
Date:2010-01-10
Time limit:2.857s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi

hide comments
2011-05-01 20:25:06 Piotr KÄ…kol
No.
Your last submission got WA because You print 2028256440200 for 888440980 and the answer is 11028256440200.

Last edit: 2011-05-01 20:27:43
2011-04-30 16:47:18 Hallvard Norheim Bø
Is n=0 a possible testcase?
2010-08-12 13:12:07 Piotr KÄ…kol
For 888440980 the correct answer is 11028256440200.
2010-08-12 11:22:24 Piotr Fusik
Could you please check why I get WA? Thank you.
2010-02-23 12:44:39 Piotr KÄ…kol
There aren't leading zeros.
You ought to print factoradic in decimal representation. Sorry for understatement.
For 439084800 You should print 1100000000000.

Last edit: 2010-02-23 12:47:46
2010-02-22 22:51:18 Paulo Roberto Santos de Sousa
I am getting several WA.
Is there leading zeros for some case?
the output for 439084800 is B00000000000?


Last edit: 2010-02-22 22:53:07
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.