I have a simple code
public static void Main(string args)
int N = Convert.ToInt32(Console.ReadLine());
long sum =1;
for(int i =1; i<= N; i++)
sum *= i;
When I run this it works just fine, but when I look at the memory consumed, if I pass the input as 8 it has taken 320kb of memory!
Not sure what causes that specific input to grow that memory!
attached the screen shot of HackerEarth results.
Input1 was 5
Input2 was 7
Input3 was 8
Inpu4 was 10
Need help in understanding what could be causing that memory increase?
Thanks in Advance