From fe76e212f54fbf1bf591e077d86aa72f6d300a05 Mon Sep 17 00:00:00 2001 From: sh0723 Date: Wed, 1 Jul 2026 13:16:22 +0900 Subject: [PATCH] =?UTF-8?q?1094=20:=20=EB=A7=89=EB=8C=80=EA=B8=B0=20solve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/week4/BOJ1094/BOJ1094_V1.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/week4/BOJ1094/BOJ1094_V1.cpp diff --git a/src/week4/BOJ1094/BOJ1094_V1.cpp b/src/week4/BOJ1094/BOJ1094_V1.cpp new file mode 100644 index 0000000..316d5bc --- /dev/null +++ b/src/week4/BOJ1094/BOJ1094_V1.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main() { + + ios_base::sync_with_stdio(false); + cin.tie(NULL); + cout.tie(NULL); + + int N; + cin >> N; + + int cnt= 0; + for (int i=0; i<8; i++) { + if (N & (1 << i)) cnt++; + } + + cout << cnt << '\n'; + + return 0; +} \ No newline at end of file