• + 0 comments

    The problem here is big integers We would not use big integers if we apply modular ariphmetics (A*B) mod M = (A mod M * B mod M) mod M

    https://www.geeksforgeeks.org/modular-multiplication/ https://www.khanacademy.org/computing/computer-science/cryptography/modarithmetic/a/modular-multiplication

    my solution:

    https://github.com/Tusenka/hackerrank/blob/main/bulbs.py