RE: [algogeeks] Re: program for evaluation of remainders

2010-12-11 Thread Shiv Shankar
, 2010 8:10 PM To: Algorithm Geeks Subject: [algogeeks] Re: program for evaluation of remainders @Ankit: Why not just use the algorithm I proposed in http://groups.google.com/group/algogeeks/msg/2941ab071a39517c: x = 0; for( i = (n N ? n : N) ; i 0 ; --i ) x = (i * x + i) % n; Dave On Dec 10

Re: [algogeeks] Re: program for evaluation of remainders

2010-12-09 Thread haxxpop
@jai gupta why is this work?? I think it just calculates (N+1)! %n haxxpop -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] Re: program for evaluation of remainders

2010-12-08 Thread jai gupta
rem=1; for(j=3;j=N+1;j++) rem=(rem*j)%n; return rem; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to