We’ll use sprague grundy theorem. We claim that grundy value of xx is same as x/2x/2 if xx is even. otherwise it is (x1)/2(x-1)/2. This can be proven with induction. after that it is straightforward.

Statistics

31% Solution Ratio
NirjhorEarliest, Jul '22
Nafis2003174.132453Fastest, 0.0s
NirjhorLightest, 131 kB
pathanShortest, 296B
Toph uses cookies. By continuing you agree to our Cookie Policy.