Math Fundamentals18 sections · 814 units
Open in Course

Problem - Super Pow

Modular exponentiation challenge

Calculate abmod1337a^b \mod 1337 where bb is given as an array of digits. For example, if a=2a = 2 and b=[1,0]b = [1, 0], you compute 210mod1337=10242^{10} \mod 1337 = 1024.

The exponent bb can be large (up to 2100 digits), so you cannot convert it to a regular integer. This tests your understanding of modular exponentiation properties.