Problem Link: http://www.spoj.com/problems/DCEPC11B/8
I solved this problem using Wilson's theorem and Fermat's Little Theorem(to find inverse modulo).
Is there a better way?
There must be because there are solutions that are 10 times faster than mine!
created
last reply
- 1
reply
- 405
views
- 2
users
- 1
link