You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Diwali Lights
You are viewing a single comment's thread. Return to all 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