#include<stdio.h> int main() { double a1,a2,a3; while(scanf("%lf%lf%lf",&a1,&a2,&a3)!=EOF) { if(a2<a1) printf("%.3lf ",a3/a1); else printf("%.3lf ",(3*a3*a2+a1*a3)/(3*a1*a2+a2*a2)); } return 0; }
设总时间为T,TA为A走路的时间,TB为B走路的时间
ATA+(T-TA)B=(T-TB)B+ATB
ATA-TAB=ATB-TBB
A(TA-TB)=B(TA-TB)
A、B不可能相等 所以TA=TB
因为VA=VB 所以俩人走路的距离相同
L:距离 A:人速 B:车速 T:总时间