Seed Of Number
All submissions for this problem are available.
A student was late to the class so as a punishment was given to him by his teacher.The Punishment was that the teacher told him to find the seed of the given number.
He said that if multiplying X by its digits equates to Y then X is said to be the seed of number Y
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- The first line of the input contains an integer of which the seed is required
Output is Y which is seed of number X
- 1 ≤ T ≤ 1000
- 1 ≤ X ≤ 103
Input: 2 123 555 Output: 738 69375
Example case 1.For number 123 the seed = 123*1*2*3.
|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, COB, FS|
Fetching successful submissions