/*
数论
类似删法求素数,注意一个数n的约数<=n/2
hdu 1215-七夕节
written by lky
2008-3-4 20:18
*/
#include<iostream>
using namespace std;
int p[500001];
int main()
{
int n, t;
int i, j, k;
for (i=1; i<=500000; ++i)
{
p[i] = 1;
}
for (i=2; i<=500000/2; ++i)
{
for (j=2; j*i<=500000; ++j)
{
p[j*i] += i;
}
}
scanf("%d", &n);
while (n--)
{
scanf("%d", &t);
printf("%d/n", p[t]);
}
return 0;
}
数论
类似删法求素数,注意一个数n的约数<=n/2
hdu 1215-七夕节
written by lky
2008-3-4 20:18
*/
#include<iostream>
using namespace std;
int p[500001];
int main()
{
int n, t;
int i, j, k;
for (i=1; i<=500000; ++i)
{
p[i] = 1;
}
for (i=2; i<=500000/2; ++i)
{
for (j=2; j*i<=500000; ++j)
{
p[j*i] += i;
}
}
scanf("%d", &n);
while (n--)
{
scanf("%d", &t);
printf("%d/n", p[t]);
}
return 0;
}