Cod sursa(job #205828)
Utilizator | Data | 3 septembrie 2008 00:44:29 | |
---|---|---|---|
Problema | Numere 2 | Scor | 35 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include<stdio.h>
long long unsigned n, a, b, x;
int main()
{
freopen("numere2.in","r",stdin);
freopen("numere2.out","w",stdout);
scanf ("%llu",&n);
a = b = 1;
for (long long unsigned d=2; d<=n; d++)
{
if (n%d==0)
{
a *= d;
x = 0;
while (n%d==0)
{
n /= d; x++;
}
b *= x;
}
}
printf("%llu\n%llu\n",a,b);
return 0;
}