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.
It seems to me that by the problem definition you can get multiple answers for the same N. For the 100 example, phi(21) is 12 and the n/phi(n) ratio is 7/4, while phi(63) is 36 and the n/phi(n) also yields 7/4. The problem statement includes no criteria for deciding ties.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #70: Totient permutation
You are viewing a single comment's thread. Return to all comments →
It seems to me that by the problem definition you can get multiple answers for the same N. For the 100 example, phi(21) is 12 and the n/phi(n) ratio is 7/4, while phi(63) is 36 and the n/phi(n) also yields 7/4. The problem statement includes no criteria for deciding ties.