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.
You can watch Raymond Hettinger's amazing talk "Numerical Marvels Inside Python" to understand why math.comb is so fast, including with very very large n (group theory ahead!).
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
nCr table
You are viewing a single comment's thread. Return to all comments →
Python
math.comb
is so fast that the following brute-force one-liner works:You can watch Raymond Hettinger's amazing talk "Numerical Marvels Inside Python" to understand why
math.comb
is so fast, including with very very largen
(group theory ahead!).