From ad44e32e097ab50a1b670cdcd34823f350cffec0 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sat, 2 Oct 2021 16:20:15 +0800 Subject: [PATCH] =?UTF-8?q?CSPJ2019A.=20=E6=95=B0=E5=AD=97=E6=B8=B8?= =?UTF-8?q?=E6=88=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://hydro.ac/d/ccf/record/615816122a2aefdda01dcfe9 --- Hydro/d/ccf/CSPJ2019A/CSPJ2019A.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Hydro/d/ccf/CSPJ2019A/CSPJ2019A.cpp diff --git a/Hydro/d/ccf/CSPJ2019A/CSPJ2019A.cpp b/Hydro/d/ccf/CSPJ2019A/CSPJ2019A.cpp new file mode 100644 index 00000000..84f6f3ab --- /dev/null +++ b/Hydro/d/ccf/CSPJ2019A/CSPJ2019A.cpp @@ -0,0 +1,15 @@ +#include + +using namespace std; + +int ans; +string s; + +int main() { + cin >> s; + for (auto c : s) { + ans += c == '1'; + } + cout << ans << endl; + return 0; +}