#include<stdio.h>
#include<string.h>
#include<stdlib.h>
long long   s[500005];
void fun()
{
    for(int i=1;i<500005;i++)
    {
        s[i]=1;
    }
    for(int i=2;i<500005;i++)
    {
        for(int j=2;i*j<500005;j++)
        {
            s[i*j]+=i;
        }
    }
}
int main()
{
    fun();
    int t,n;
    while(scanf("%d",&t)!=EOF)
    {
        while(t--)
        {
            scanf("%d",&n);
            printf("%I64d\n",s[n]);
        }
    }
   //system("pause");
    return 0;
}
posted on 2011-07-19 16:28  枫叶飘泪  阅读(300)  评论(0编辑  收藏  举报