Runtime Error
/in/foo.cc: In function 'int main()': /in/foo.cc:9:29: warning: iteration 1000008 invokes undefined behavior [-Waggressive-loop-optimizations] for(int i=2;i<=N;i++) jc[i]=(jc[i-1]*i); ~~~~~^~~~~~~~~~~~ /in/foo.cc:9:15: note: within this loop for(int i=2;i<=N;i++) jc[i]=(jc[i-1]*i); ~^~~