#include <iostream>
#define M 100000 // [1..M]
#define clr(x, k) memset((x), (k), sizeof(x))
bool f[M];
int d[M], p=0;
void Getprime()
{
int i, j;
p = 0;
clr(f, 0);
for (i=2;i<M;++i)
{
if (!f[i]) d[p++] = i;
for (j=0;(j<p && i*d[j]<M);++j)
{
f[i*d[j]] = 1;
if (i % d[j] == 0) break;
}
}
}
int main()
{
Getprime();
int n,i,a[10000];
while(scanf("%d",&n)!=EOF)
{
int total=0;
for(i=0;d[i]*d[i]<=n;i++)
{
if(n%d[i]==0)
{
a[total++]=d[i];
n/=d[i];
while(n%d[i]==0)
{
a[total++]=d[i];
n/=d[i];
}
}
}
if(n>1)
a[total++]=n;
printf("%d",a[0]);
for(i=1;i<total;i++)
printf("*%d",a[i]);
printf("\n");
}
return 0;
}
#include <iostream>
using namespace std;
#define M 500003 // 01会WA
int main()
{
int i, j, t, n, k;
int p[M] = {0,0};
for (i=2;i<M;++i) p[i] = 1;
for (i=2;i<M/2;++i) // 枚举约数
{
for (j=2;j*i<M;++j)
{
p[j*i] += i;
}
}
scanf("%d", &n);
while (n--)
{
scanf("%d", &t);
printf("%d\n", p[t]);
}
return 0;
}
#include <iostream>
using namespace std;
#define M 500003 // 01会WA
int main()
{
int i, j, t, n, k;
int p[M] = {0,0};
for (i=2;i<M;++i) p[i] = 1;
for (i=2;i<M/2;++i) // 枚举约数
{
for (j=2;j*i<M;++j)
{
p[j*i] += i;
}
}
scanf("%d", &n);
while (n--)
{
scanf("%d", &t);
printf("%d\n", p[t]);
}
return 0;
}