0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

747. 数组的左上半部分

https://www.acwing.com/problem/content/submission/code_detail/6874266/
This commit is contained in:
Baoshuo Ren 2021-08-03 21:39:51 +08:00 committed by Baoshuo Ren
parent b09f55411e
commit 21b7c802bc
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

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

@ -0,0 +1,17 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
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 < 11 - j) sum += x;
}
}
cout << fixed << setprecision(1) << sum / (op == 'S' ? 1 : 66) << endl;
return 0;
}