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)
↵
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://