the question is
Take a number, x, find its factorial, remove the zeroes, and find the last digit.
#include<stdio.h>
#include<math.h>
int main()
{
long long int p,r;
int m,n,i,j;
scanf("%d",&m);
for(i=0;i<m;i++)
{
long long int s=1;
int count=1;
scanf("%d",&n);
if(n==0)
printf("1\n");
else
{
while(n>0)
{
if((n%5)==0)
{
count++;
}
s=s*n;
n--;
}
p=pow(10,count);
// printf("%lld\n",p);
r=s%p;
printf("%d\n",r);
}
}
return 0;
}