After spending years as a nematologist, you've finally acquired yourself a pet worm. Unfortunately, since it's your first pet worm, you're unsure of your ability to maintain its welfare.
Your worm begins with $$$F$$$ fullness. Every day, you feed it, increasing its fullness by $$$A$$$. Every night, it consumes energy, losing $$$B$$$ fullness.
Your worm will finally be happy as soon as it reaches or exceeds $$$1000$$$ fullness.
Given the worm's initial fullness and your feeding regimen, determine how many days it will take before the worm gets full (or that it will never become full).
A single line with values $$$0 \leq F \leq 999$$$, $$$1 \leq A, B \leq 100$$$.
The day on which the worm becomes full, or $$$-1$$$ if this never occurs.
900 50 25
3
500 10 10
-1
Name |
---|