The reason you are getting WA is because of integer overflow because numbers are too big.100 factorial has 24 zeros! NO data type in C/C++ is sufficient to hold such large numbers. You might want to see this awesome tutorial by @kuruma
the above code worked in my code blocks but in code chef each time its showing me either of segmentation fault(SIGSEGV) or wrong answer or time limit exceeded…can you help me??