SPOJ problem BORING help

Revision en1, by zeref_dragoneel, 2016-01-01 10:58:50

http://www.spoj.com/status/BORING/

I know a Abs(N-P) Algorithm using Wilson's theorem (per test case) but that is not passing the time limit. Can someone suggest something ?

Tags number theory, spoj

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English zeref_dragoneel 2016-01-01 10:59:10 12 Tiny change: '.spoj.com/status/BORING/\' -> '.spoj.com/problems/BORING/\'
en1 English zeref_dragoneel 2016-01-01 10:58:50 200 Initial revision (published)