You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
610 B
28 lines
610 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//cin读入优化
|
|
std::ios::sync_with_stdio(false);
|
|
//输入+输出重定向
|
|
freopen("../wood.in", "r", stdin);
|
|
freopen("../wood.out", "w", stdout);
|
|
|
|
int m, n, t, x, y;
|
|
cin >> m >> n >> t >> x >> y;
|
|
|
|
//找规律
|
|
//1块--1刀---2块
|
|
//1块--2刀---3块
|
|
//2块--1刀---3块
|
|
//2块--2刀---4块
|
|
//3块--1刀---4块
|
|
//3块--2刀---5块
|
|
float a = 1.0 * t / (n - m);
|
|
printf("%.2f",(y-x)*a);
|
|
//关闭文件
|
|
fclose(stdin);
|
|
fclose(stdout);
|
|
return 0;
|
|
} |