Tuesday 13 September 2016

Prime factors

Standard
Given a q queries with each containing a number n , print all the prime factors on n separated by space.
for example :-
if n=100,
print  2 2 5 5

if n=210
print 2 3 5 7

Use this input.
11
100
210
999
1999
387456
12337857
1000000000
1222326389726
87562986844627
4269888900268907
98346736477364738

Post your answer in the comment section.
you can use the following compilers to test your code.

0 comments:

Post a Comment