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.
14 lines
482 B
14 lines
482 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//题目给出的评测机数量和时间
|
|
int n1 = 8, t1 = 30, n2 = 10, t2 = 6;
|
|
int t3 = 10; //题目要求的时间10分钟
|
|
double inc_rate = (1.0 * n1 * t1 - n2 * t2) / (t1 - t2);//增长速度,注意1.0的用途
|
|
double init_num = n2 * t2 - inc_rate * t2;//初始化队列长度
|
|
double ans = (init_num + t3 * inc_rate) / t3;//求得答案
|
|
cout << ans << endl;
|
|
return 0;
|
|
} |