From 75f30d7c6119e0c5ff6a04791b6d9d0ed5b972ae Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Tue, 3 Aug 2021 14:48:35 +0800 Subject: [PATCH] =?UTF-8?q?750.=20=E6=95=B0=E7=BB=84=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E6=96=B9=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/6863091/ --- AcWing/750/750.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 AcWing/750/750.cpp diff --git a/AcWing/750/750.cpp b/AcWing/750/750.cpp new file mode 100644 index 00000000..7e751fcb --- /dev/null +++ b/AcWing/750/750.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 > j && i + j > 11) sum += x; + } + } + cout << fixed << setprecision(1) << sum / (op == 'S' ? 1 : 30) << endl; + return 0; +}