New Year and Permutation
1284C1600· expert1s1024 MB⌨ stdin/stdout
Examples
Sample 1of 5
Input
1 993244853
Output
1
Sample 2of 5
Input
2 993244853
Output
6
Sample 3of 5
Input
3 993244853
Output
32
Sample 4of 5
Input
2019 993244853
Output
923958830
Sample 5of 5
Input
2020 437122297
Output
265955509
58%
1284C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)