You are viewing a single comment's thread. Return to all comments →
Solution in Python 3.0
def stones(n, a, b): if a == b: return [(n - 1) * a] if a > b: a, b = b, a return [a * (n - 1 - i) + b * i for i 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 →
Solution in Python 3.0