Skip to content
Sign upLog in
← Back to Community
6.4. While: Jogging
Profile icon
pole55

"As a future athlete you just started your practice for an upcoming event. On the first day you run x miles, and by the day of the event you must be able to run y miles.

Calculate the number of days required for you to finally reach the required distance for the event, if you increases your distance each day by 10% from the previous day.

Print one integer representing the number of days to reach the required distance."

Example input
10
30

Example output
13

Voters
Profile icon
ChristinaSherin
Profile icon
DaneWebster
Profile icon
IvanChou
Profile icon
AmirElangouri
Profile icon
tomsfy
Profile icon
JoshuaDame
Profile icon
amay05
Profile icon
pole55
Comments
hotnewtop
Profile icon
AmirElangouri

why x * 0.1 can someone explain?

Profile icon
AnupamaGarg1

@AmirElangouri
This is increased capacity of runner each day.

Profile icon
AmirElangouri

@AnupamaGarg1
Oh thx this seems obvious thx for the answer!!