How to do modulu operations and modulu inverse by non prime numbers?
Difference between en2 and en3, changed 78 character(s)
Given N distinct integers from 1 to N, you have to find the number of ways the N integers can be rearranged in M empty slots such that, no integer matches with its slot index. Note that, slots are indexed from 1 to M.↵

Print the number of ways modulo 23377788.↵

0<=N<=M<100000 and It has 200 test cases.↵

I came up with a solution like this but not sure its correct or not. And have not any idea to modulu it by non prime.↵
![ ](http://
pasteboard.co/3OaugfEducodeforces.com/predownloaded/fb/d9/fbd9a20094310767b0a2a6838bd4b9f8e8b02450.jpg)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English habib_rahman 2017-02-24 09:39:35 78
en2 English habib_rahman 2017-02-24 09:38:01 11 Tiny change: 'prime.\n![My solution ](http://' -> 'prime.\n![ ](http://' (published)
en1 English habib_rahman 2017-02-24 09:34:30 549 Initial revision (saved to drafts)