您的位置:首页 > 其它

Codeforces Round #364 (Div. 2) D As Fast As Possible

2017-10-02 20:33 411 查看
参考:http://blog.csdn.net/acm_fighting/article/details/52003538

#include <bits/stdc++.h>
using namespace std;

int main(){
int n,k;
double l,v1,v2;
cin >> n >> l >> v1 >> v2 >> k;
int g = n/k+int(bool(n%k));
double a=(v1+v2)*l/(v1+v2+2*(g-1)*v1);
double out=a/v2+(l-a)/v1;
cout << fixed << setprecision(7) << out << endl;
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: