0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 13:18:46 +00:00

746. 数组的左下半部分

https://www.acwing.com/problem/content/submission/code_detail/6861871/
This commit is contained in:
Baoshuo Ren 2021-08-03 13:55:37 +08:00 committed by Baoshuo Ren
parent 0e8b37a556
commit 59b7cf75f3
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

17
AcWing/746/746.cpp Normal file
View File

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