Short Permutation Problem
1909I1900· candidate master7s1024 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
3 2
Output
77824
Sample 2of 4
Input
4 1000000000
Output
30984329
Sample 3of 4
Input
8 327869541
Output
85039220
Sample 4of 4
Input
4000 1149333
Output
584870166
58%
1909I.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)