-->
当前位置:首页 > 题库

PROGRAMMING:Taxi pricing

Luz5年前 (2021-05-10)题库453
According to the standard of a city's ordinary taxi fare, the program is required to calculate the fare. The specific standards are as follows:
-The starting distance is 3 km and the starting fee is 10 yuan;
-2 yuan per kilometer within 10 kilometers after exceeding the starting mileage;
-If the distance exceeds 10 km, a 50% return subsidy will be charged, that is, 3 yuan per km;
-In the course of operation, if there is a temporary stop due to road obstruction or passengers' request, the charge will be 2 yuan per 5 minutes (no charge for less than 5 minutes).
###Input format:
Input: the input mileage (unit: km, accurate to 1 decimal place) and waiting time (integer: min) are given in one line, separated by spaces.
###Output format:
Output the fare (in Yuan) that the passenger should pay in one line, and round the result to yuan.
###Input sample 1:
```in
2.6 2
```
###Output sample 1:
```out
ten
```
###Input sample 2:
```
5.1 4
```
###Output sample 2:
```
fourteen
```
###Input sample 3:
```
12.5 9
```
###Output sample 3:
```
thirty-four
```






answer:If there is no answer, please comment