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.
Creating an IntStream from the input would be cool but I'm not sure how to do it since InputStream from Java 1.0 is much different than IntStream from Java 1.8.
I updated the code to take into account your suggestion of finding factors of B_GCD/A_LCM. I don't use the upper-bound of 100 since i want to keep solution general.
Finding the LCM of a set of numbers efficiently would also be cool and would make Euclid proud.
Thanks for the tips.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Between Two Sets
You are viewing a single comment's thread. Return to all comments →
Excellent points!
Creating an IntStream from the input would be cool but I'm not sure how to do it since InputStream from Java 1.0 is much different than IntStream from Java 1.8.
I updated the code to take into account your suggestion of finding factors of B_GCD/A_LCM. I don't use the upper-bound of 100 since i want to keep solution general.
Finding the LCM of a set of numbers efficiently would also be cool and would make Euclid proud.
Thanks for the tips.