The day you exceed the goal

Write code · Medium · §1.2 Sizing up

You have start followers today, and you gain per_day followers each day. Complete the function solution, which returns the first day on which you have more than goal followers.

Today is day 0. If you already have more than goal followers today, return 0.

Function

solution(start, per_day, goal)

Constraints

Examples

startper_daygoalresult
1203550011
500105001

Starter code

def solution(start, per_day, goal):
    answer = 0
    return answer

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.