Demo entry 5853501

E

   

Submitted by ZZZZ on Jul 20, 2016 at 13:26
Language: C++. Code size: 430 Bytes.

#include<stdio.h>
int main()
{
   __int64 a[100],num,i,n;
   while(scanf("%I64d",&n)!=EOF)
   {
      num=0;
      for(i=2;i*i<=n;i++)
      { 
          if(n%i==0)
          {
              a[num++]=i;
              while(n%i==0)
                 n=n/i;
          }
      }
      if(n>1)
         a[num++]=n;
      for(i=0;i<num;i++)
          printf("%I64d ",a[i]);
      printf("\n");
   }
   return 0;
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).