「codeforces - 185D」Visit of the Great
link。简单提一下做法,注意到 $k^{2^a}\equiv k^{2^b}\equiv-1\equiv (-1)^{2^{b-a}}=1\pmod{(k^{2^a}+1,k^{2^{b}}+...
In mathematics you don't understand things, you just get used to them.
In mathematics you don't understand things, you just get used to them.