Nyist OJ Nyoj 865

Source: Internet
Author: User

/*
It's a violent one, and I've found a rule. Fast sieve factor with Euler's function plus the law.
Gives the form of the product of any number n exponential power, and the final result equals the number of each prime power.
such as 72=8*9=2^3*3^2 F (=f) (8) *f (9) =10*6=60
And the result of an F (n) of the power of any one prime is
1 2 3 4 5 6 (second party)
2 3 6 10 15 21
3 3 6 10 15 21
5 3 6 10 15 21
Pixels
So knowing the power of primes is easy to know F ()
*/
#include <stdio.h>
int main ()
{
int k=1;
Long Long a[40],i,b=3,n,c;
a[1]=3;
for (i=2; i<=37; i++)
a[i]=a[i-1]+b++;
while (scanf ("%lld", &n)!=eof)
{
C=1;
for (i=2;i*i<=n;i++)
{
if (n%i==0)
{
b=0;
while (n%i==0)
{
b++;
N/=i;
}
C*=A[B];
}
}
if (n>1)
c*=3;
printf ("Case%d:%lld\n", k++,c);
}
return 0;
}

Nyist OJ Nyoj 865

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.