
help me out from here please

what is wrong with my solution??
#include<bits/stdc++.h>
using namespace std;
**//driver program...**
int main(){
long long int T,N,i,j,K,arr[500001];
//precalculation...
for(i=1 ;i <= 500000;i++) arr[i]=1;
for(i=2;i<=708;i++)
for(j=2*i;j<=500000;j+=i)
arr[j]=(arr[j]*i)%10000;
scanf("%lld",&T);
while(T){
scanf("%lld",&N);
if(N==1) printf("\n");
else if(arr[N]==0) printf("0000\n");
else printf("%lld\n",arr[N]);
}
return 0;
}