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.
Hi,I saw most of the solutions and the testers code.What people did was while(num%2==0)num/=2,a++ and while(num%5==0)num/=5,b++ and they found out max(a-2,b) ...i tried a lot to understand but could not understand the reason...can you help me to figure out the solution..please..thanks in advance
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Task Scheduling
You are viewing a single comment's thread. Return to all comments →
Hi,I saw most of the solutions and the testers code.What people did was while(num%2==0)num/=2,a++ and while(num%5==0)num/=5,b++ and they found out max(a-2,b) ...i tried a lot to understand but could not understand the reason...can you help me to figure out the solution..please..thanks in advance