Files
operators/task_14.py
2025-12-11 18:01:56 +05:00

15 lines
508 B
Python

s = float(input("Введите пробег первого дня (км): "))
p = float(input("Введите процент увеличения: "))
total_distance = s
current_distance = s
print(f"День 1: {current_distance:.1f} км")
for day in range(2, 11):
current_distance = current_distance * (1 + p / 100)
total_distance += current_distance
print(f"День {day}: {current_distance:.1f} км")
print(f"\nСуммарный путь за 10 дней: {total_distance:.1f} км")