#include <stdio.h>
float all;
float money;
float fee(int distance,int time)
{if(distance<=3)
{
money=14;
}
else
{
if(time>=5&time<=23)
{
money=(distance-3)*2.3+14;
}
else
{
money=(distance-3)*2.3*1.2+14;
}
}
return money;
}
int main()
{
all=fee(12,9)+fee(12,18);
printf("%.2f",all);
return 0;
}
可喜可贺