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

PROGRAMMING:come on.

Luz5年前 (2021-05-10)题库443
Xiao Ming often goes to two gas stations for gas, one of which is manual service at gas station a, and the other is self-service at gas station B. Recently, the oil price has risen. The oil price of station a is 6.8 yuan / L, and that of station B is 6.2 yuan / L. Xiao Ming wants to go to the cheapest gas station to fill up his car. It is known that the fuel consumption of the car is 8L / 100km and the capacity is 55L. Please help Xiao Ming calculate whether he should go to station a or station B and the amount of money saved.
###Input format:
Input three positive real numbers in one line, N, D1, D2, n are the remaining oil quantity in the current tank, unit: liter, D1 is the current distance from station a, unit: km, D2 is the current distance from station B, unit: km.
###Output format:
When the amount of money saved is more than or equal to 10 yuan, the name of the gas station Xiao Ming should go to and the amount of money saved will be output in one line, with a space in the middle, and the amount of money will be kept to one decimal place.
Otherwise, go to the nearest gas station and output the name of the gas station. The topic guarantees that the distance is not the same.
###Input sample 1:
```in
10 3.6 3.8
```
###Output sample 1:
```out
B 27.1
```
###Input sample 2:
```in
20 30.3 60.6
```
###Output sample 2:
```out
A
```






answer:If there is no answer, please comment