FACTCG2 - Medium Factorization
The task in this problem is to write a number in a multiplication of prime numbers separated by “ x ”. You need to put the number 1 in this multiplication.
Input
The input consists of several lines.
Each line consists of one integer N (1 <= N <= 10^7) .
Output
For each line you need to output the factorization separated by “ x ” and including 1.
Sample
Input 1 2 4 8 Output 1 1 x 2 1 x 2 x 2 1 x 2 x 2 x 2
hide comments
Pranye Mawai:
2015-02-04 12:42:36
minimize the use of long long ... may lead to tle.. |
|
Jumpy:
2015-01-18 17:36:40
After, So Many Tries Got AC.
|
|
computer science:
2015-01-12 02:17:48
what is number of lines ?
|
|
epsilon:
2015-01-05 13:49:42
finally done.......after lots of tle |
|
arpankumarmishra1994@gmail.com:
2015-01-02 20:28:03
what does several lines mean?
|
|
Hot-Shot:
2014-12-27 19:55:02
guys sieve works properly
|
|
black MaMbA:
2014-11-03 04:26:18
12799109-cannot understand why i am getting wrong answer.plz help |
|
Infinity:
2014-10-20 19:38:59
<snip>
|
|
Rahul Ranjan:
2014-10-05 06:19:27
getting WA on 4th test case....Suggest some test cases..I m using sieve...link----> <snip> Last edit: 2023-05-27 21:16:02 |
|
Baojun Wang:
2014-09-18 00:05:18
same algorithm, C++ passed, Haskell version TLE, even haskell version is almost the same on my machine. Time to upgrade haskell compiler on SPOJ? Last edit: 2014-09-18 00:24:41 |
Added by: | Phyllipe Medeiros |
Date: | 2012-02-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |