I think you are saying the same . Did you check my sample code for pf . Here it is fQZFMk - Online C++0x Compiler & Debugging Tool - Ideone.com .
Maybe this works as well.
yeah ! So if a number is composite , the inner while loop will reduce my number , and the sqrt(n) will also get further reduced . But if a number is prime itself , then inner while loop wonāt run and my complexity in worst case will be sqrt(n) . How will you achieve sqrt(n)/10 in this case .
I precompute all prime numbers before hand and push them into a vector (letās say vector v) (using sieve).
PS: This is useful when we want to factorize more than 10 numbers.
We had to factorize 15 different numbers in the que which was discussed in this thread.
Then for each test case i do
for(int i=0;v[i]<=sqrt(n);i++)
while(n%v[i]==0)
n/=v[i];
What about the pf greater than the sqrt(n) . It will itself be prime right ? .
right \hspace{0mm}
Thanx . By the way whatās your cf handle name ?
smit_mandavia \hspace{0mm}
welcome
Such a Genius 









Youāre joking
\hspace{0mm}
results announcedā¦,.,.,.,.,.,.,
where we can see the rank?? they just send me the mail of shortlisting wtf??
yes same hereā¦,.,.,.,.,
in mockvita the results and ranks are showcase on TCS codevita siteā¦Now it will not open for loginā¦Iām so desperate to see my rankā¦XD
Used sqrt method to found all the divisor and created two list one containing divisor in ascending order and other in descending order . printed 2nd list in descending order . I got this solution passed after 2-3 attempts 
I did exactly same but got TLE 
Do in C they have supercomputer 

This is working :
import java.util.*;
public class Divinedivisor {
public static void main(String[]args)
{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
Listl1=new ArrayList();
for(int i=1;i<=n;i++)
{
if(n%i==0)
{
l1.add(i);
}
}
for(int i=0;i<l1.size();i++)
{
System.out.println(l1.get(i)+" ");
}
}
}
