Today's Puzzle: Time Traveler's Dilemma
Imagine you have a watch that can travel back in time, but it always lands 5 minutes earlier than you want.
Write a program to calculate the time you would need to set on the watch to arrive exactly on time.
Hint: You'll need to use a loop and some basic math.
Start by setting the current time to 1000.
time = 1000
Next, subtract 5 from the current time and set it as the target time.
target_time = time - 5
Then, use a loop to keep subtracting 5 from the target time until it reaches the current time.
while target_time < time: target_time = target_time - 5
When the target time reaches the current time, print out the correct time to set on the watch.
print(target_time)
That's it! Now you have the correct time to set on your watch.
But wait, what's that noise? Sounds like someone's trying to solve another puzzle...