19. Car
Здравейте, тая задача в системата 0/100 ми дава , в конзолата се изпълнява.Може ли малко помощ.
моя код https://pastebin.com/aKGbzvWW
https://judge.softuni.bg/Contests/Practice/Index/467#18
Create a class Car. Every car has a speed (km/h), fuel (liters) and fuel economy (L/100km) (given in the same order on the first line). They should be stored in the class. Your task is to create a program which executes one of the commands:
- Travel <distance> – makes the car travel the specified <distance>
If you are given a distance which you don't have enough fuel to travel, just go as far as you can.
- Refuel <liters> – refuels the car with the specified <fuel>
- Distance – gets the total travel distance
- Time – get the total travel time
- Fuel – gets the remaining fuel
- END – stops the program
Output
Print the total distance traveled, total travel time and fuel left at the end of the trip as in the Example below.
Note
Round values up to one decimal digit after the decimal point, applies for kilometers and liters.
Show only minutes, discarding the seconds. For Example 2 minutes 40 seconds and 2 minutes 20 seconds all become 2 minutes.
Examples
Input |
Output |
100 20 20 Travel 100 Distance Time Fuel END |
Total Distance: 100.0 Total Time: 1 hours and 0 minutes Fuel left: 0.0 liters |
Благодаря ти, много красив код :)