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.
"In mathematics, Kummer's theorem on binomial coeffients gives the highest power of a prime number p dividing a binomial coefficient. In particular, it asserts that given integers n ≥ m ≥ 0 and a prime number p, the maximum integer k such that pk divides the binomial coefficient \tbinom n m is equal to the number of carries when m is added to n − m in base p."
No more comments
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Join us
Create a HackerRank account
Be part of a 26 million-strong community of developers
Please signup or login in order to view this challenge
How can I fix the TLE in my code? https://www.hackerrank.com/rest/contests/master/challenges/bincoefrevenge/hackers/svatejas/download_solution
Probably something in this paper tells how to do this http://www.dms.umontreal.ca/~andrew/PDF/BinCoeff.pdf http://en.wikipedia.org/wiki/Kummer%27s_theorem
"In mathematics, Kummer's theorem on binomial coeffients gives the highest power of a prime number p dividing a binomial coefficient. In particular, it asserts that given integers n ≥ m ≥ 0 and a prime number p, the maximum integer k such that pk divides the binomial coefficient \tbinom n m is equal to the number of carries when m is added to n − m in base p."