|  | 
|  | 
| back to board | tests 1 10
 
 1 50000
 5130
 
 50000 1
 2
 
 19 40320
 4204
 
 p.s. why time limitation is 2sec? it can be solved very fast using Lucas theorem.
 
 Edited by author 16.12.2011 12:47
Re: tests Your tests are invalid. M < N. So you posted three bad cases. The only correct is 50000 1. | 
 | 
|