func solution(_ price:Int, _ money:Int, _ count:Int) -> Int64{
let total = (1...count).map { $0 * price}.reduce(0, +)
return Int64(total > money ? total - money : 0)
}
func solution(_ price:Int, _ money:Int, _ count:Int) -> Int{
return max((count + 1) * count / 2 * price - money , 0)
}