You are viewing a single comment's thread. Return to all comments →
def stones(n, a, b): offset = max(a,b) - min(a,b) base = (n-1) * min(a,b) g = itertools.count(base, offset) return [base] if not offset else [next(g) for _ in range(n)]
Seems like cookies are disabled on this browser, please enable them to open this website
Manasa and Stones
You are viewing a single comment's thread. Return to all comments →