Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 212 Bytes

needmoney.md

File metadata and controls

11 lines (9 loc) · 212 Bytes

need money

def solution(price, money, count):
    answer = 0
    need_money = price * count * (count + 1) / 2
    if need_money > money:
        answer = need_money - money
    
    return answer