From 197eae2c5020e3fcc09498506f23212eab8ec748 Mon Sep 17 00:00:00 2001 From: MGPOCKY Date: Thu, 11 Jul 2024 14:42:20 +0300 Subject: [PATCH] =?UTF-8?q?1475=EB=B2=88=20-=20=EB=B0=A9=20=EB=B2=88?= =?UTF-8?q?=ED=98=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 201902654/1475.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 201902654/1475.cpp diff --git a/201902654/1475.cpp b/201902654/1475.cpp new file mode 100644 index 0000000..442142c --- /dev/null +++ b/201902654/1475.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +using namespace std; + +int main(void) { + ios::sync_with_stdio(0); + cin.tie(0); + + string N; + vector arr(10, 0); + getline(cin, N); + for (char ch : N) { + ++arr[ch - '0']; + } + arr[6] = (arr[6] + arr[9] + 1) / 2; + arr[9] = 0; + int max = 0; + for (int iter : arr) { + if (max < iter) { + max = iter; + } + } + cout << max; +}