Doubt in Modular Arithmetic
Difference between en1 and en2, changed 10 character(s)
Today in [problem:1557C] I wanted to compute ${(2^{k-1})}^{n}$. But instead of writing <span class="prettyprint"> binpow(binpow(2, k &mdash; 1), n)</span>, I simplified it to $2^{n*(k-1)*n}$ and wrote <span class="prettyprint"> binpow(2, mul(n, k &mdash; 1, n))</span> and failed to pass pretest 2.↵

Why are not the two equivalent?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English bugdone 2021-08-09 22:23:40 10
en1 English bugdone 2021-08-09 22:19:43 355 Initial revision (published)