I am having problem with my code. Spoj says WA. Here is my source code:
include
include
int main()
{
int t,input;
char j,num;
char temp;
char zero;
scanf ("%d",&t);
for (j=0; j {
scanf("%d", &input);
if (input < 5)
{
zero = 0;
}
else
{
temp = input/5;
num = (input % 5) + 1;
zero = num*temp + (5*temp*(temp-1)/2);
}
printf("\n%c",zero);
}
return 0;
}