why spoj.pl judge gives me wrong answer????

problem #24 Small factorials

here is the code:

using System;

class Program
{
static void Main()
{
long t = 0, n = 0, d = 0;
long c = 0;
t = Convert.ToInt64(Console.ReadLine().Trim());
while (c < t)
{
n = Convert.ToInt64(Console.ReadLine().Trim());
if (n < 100) ;
d= factorial(n);
Console.WriteLine(d);
c++;
}
}

static long factorial(long d)
{

long c = 0;
long e = 1;
long j = 1;
while (c<d)
{
j = j * e;
c++;
e++;
}
return j;
}
}

the code runs ok on visual basic, but spoj online judge gives me wrong answer... helppp.