bugdone's blog

By bugdone, history, 3 years ago, In English

Today in 1557C - Moamen and XOR I wanted to compute $$${(2^{k-1})}^{n}$$$. But instead of writing binpow(binpow(2, k — 1), n), I simplified it to $$$2^{(k-1)*n}$$$ and wrote binpow(2, mul(k — 1, n)) and failed to pass pretest 2.

Why are not the two equivalent?

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it