[quote]i am getting WA ....although i am getting correct output on my system for each test case;
test case:
Sample Input:
6
3
60
100
1024
23456
8735373
Sample Output:
0
14
24
253
5861
2183837
..i don't understand why am i getting WA??plz help..
here my code:
i am getting WA ....although i am getting correct output on my system for each test case;
test case:
Sample Input:
6
3
60
100
1024
23456
8735373
Sample Output:
0
14
24
253
5861
2183837
..i don't understand why am i getting WA??plz help..
here my code:
#include<stdio.h>
int main(void)
{
long int num1,div,num[100000],temp,numzero[100000];
int i,j;
printf("\nEnter Number:->");
scanf("%ld",&num1);
for(i=1;i<=num1;i++)
{
scanf("%ld",&num[i]);
}
printf("Output:\n");
for(j=1;j<=num1;j++)
{
numzero[j]=0;
div=5;
temp=1;
while(temp!=0)
{
temp=num[j]/div;
numzero[j]+=temp;
div*=5;
}
printf("%ld\n",numzero[j]);
}
printf("\n");
return ;
}[code]