From 21b7c802bc0e060c8e783e97a2aa11464b6beb55 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Tue, 3 Aug 2021 21:39:51 +0800 Subject: [PATCH] =?UTF-8?q?747.=20=E6=95=B0=E7=BB=84=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E4=B8=8A=E5=8D=8A=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/6874266/ --- AcWing/747/747.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 AcWing/747/747.cpp diff --git a/AcWing/747/747.cpp b/AcWing/747/747.cpp new file mode 100644 index 00000000..226d4b75 --- /dev/null +++ b/AcWing/747/747.cpp @@ -0,0 +1,17 @@ +#include + +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; +}