We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
taking mod at each value helps in keeping the product in the range of 1234567 so computation will be easy.
concept is (a*b*c) mod 1234567==
(a mod 1234567) * (b mod 1234567) * (c mod 1234567)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Connecting Towns
You are viewing a single comment's thread. Return to all comments →
taking mod at each value helps in keeping the product in the range of 1234567 so computation will be easy. concept is (a*b*c) mod 1234567== (a mod 1234567) * (b mod 1234567) * (c mod 1234567)