0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 15:18:46 +00:00
Baoshuo Ren 2021-08-03 15:03:14 +08:00 committed by Baoshuo Ren
parent ac5c9e19a0
commit eb20579b2a
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

19
AcWing/743/743.cpp Normal file
View File

@ -0,0 +1,19 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int l;
cin >> l;
char op;
cin >> op;
double x, sum = 0;
for (int i = 0; i < 12; i++) {
for (int j = 0; j < 12; j++) {
cin >> x;
if (i == l) sum += x;
}
}
cout << fixed << setprecision(1) << sum / (op == 'S' ? 1 : 12) << endl;
return 0;
}