一个杭电小题 帮我看看哪有问题
http://acm.hdu.#include<stdio.h>
#include<math.h>
int main()
{
long k,n;
int a[46]={0,1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6,1,2,3,4,5,6,7,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,9};
scanf("%ld",&n);
while(n--)
{
scanf("%ld",&k);
if(k>45)
{
k=k-45;
k=k%9;
if(k==0)
k=9;
}
else if(1<=k && k<=45)
k=a[k];
printf("%d\n",k);
}
}