mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:52:02 +00:00
P5082 成绩
R52203603
This commit is contained in:
parent
1ca38e37c8
commit
e9d383c241
21
Luogu/problem/P5082/P5082.cpp
Normal file
21
Luogu/problem/P5082/P5082.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
long long n, a[10000005], b[10000005], c[10000005], a1, b1, c1;
|
||||
|
||||
int main() {
|
||||
cin >> n;
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> a[i];
|
||||
a1 += a[i];
|
||||
}
|
||||
for (int i = 0; i < n; i++) {
|
||||
cin >> b[i];
|
||||
c[i] = a[i] - b[i];
|
||||
b1 += b[i];
|
||||
c1 += c[i];
|
||||
}
|
||||
cout << fixed << setprecision(6) << 1.00 * (a1 * 3 - b1 * 2) / c1 << endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user