





















events 0 in console should work

























for i in count(1):
dexp += 1
dnum = (dnum * 7) % mod
if dnum == door:
break


i i suppose


while True: instead

dexp = 0
dnum = 1
while True:
dexp += 1
dnum = (dnum * 7) % mod
if dnum == door:
break













pow(base, exponent, mod)

pow(number, -1, mod) for modular inverses (edited)



from math import * you get a different pow function!)
math.pow without that functionality to distract from the fact that there is a better pow function built-in 















































































