Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

SPOJ problem BORING help

Revision en2, by zeref_dragoneel, 2016-01-01 10:59:10

http://www.spoj.com/problems/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)