[2023 OUCC Round 1] Saving Up
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Kaleisha, a student, works at a coffee shop and is trying to save her earnings to buy an e-bike. She spends £20 a day on food and bus fares. She wants to find out if she will be able to buy an e-bike after 10 days of working. The bike Kaleisha wants to buy is £1000. She looks back at her pay for the last 20 days working at the coffee shop.
Task:
Write a program that totals Kaleisha's daily earnings and outputs how many days it would have taken her, in the provided 20 days, to save £1000. Your program must also remove the student's £20 daily expenses.
Constraints:
[Note: you do not need to check constraints in your code for this competition - they are just for information about the range of test data values.]
- All integers in the input will be less than or equal to 200.
- The data provided will always be enough to save £1000 by the 20th day.
Input format:
- A single row of 20 integers separated by spaces.
Output format:
- An integer.
Example:
80 150 200 90 110 150 150 77 59 200 100 190 205 190 115 150 160 97 102 100
10