0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-08 14:58:48 +00:00

752. 数组的右方区域

https://www.acwing.com/problem/content/submission/code_detail/6855355/
This commit is contained in:
Baoshuo Ren 2021-08-03 08:57:42 +08:00 committed by Baoshuo Ren
parent 8e4953349a
commit 7c39bb0a24
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

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

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