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.
hint: in order to see the "divisors of n!^2" thing, do not complete the partial fractions, e.g. 1/x + 1/y = xy/(x+y). that doesn't help all. Instead, solve for x.
also, from the editorial, the proof that y-n! cannot be negative is kind of glossed over and slightly nontrivial. It can be done by starting from x>0 and showing that y-n!<0 would lead to a contradiction.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Equations
You are viewing a single comment's thread. Return to all comments →
hint: in order to see the "divisors of n!^2" thing, do not complete the partial fractions, e.g. 1/x + 1/y = xy/(x+y). that doesn't help all. Instead, solve for x.
also, from the editorial, the proof that y-n! cannot be negative is kind of glossed over and slightly nontrivial. It can be done by starting from x>0 and showing that y-n!<0 would lead to a contradiction.