codeforces 700A
http://codeforces.com/contest/700/problem/A
代码如下:
#include <iostream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <algorithm>
#include <queue>
using namespace std;
int main() {
int n, k;
double l, v1, v2;
cin >> n >> l >> v1 >> v2 >> k;
int b = (n + k - 1) / k;
double den = (2 * (b - 1) * v1 / (v1 + v2)) + 1;
double x = l / den;
double ans = x / v2 + (l - x) / v1;
printf("%0.9f\n", ans);
return 0;
}