Doremy's Pegging Game
1764D2000· candidate master1.5s512 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
4 100000007
Output
16
Sample 2of 2
Input
1145 141919831
Output
105242108
58%
1764D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
4 100000007
16
1145 141919831
105242108