From 56c90deb8b6340f7d410c4673f81872f5011d722 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Thu, 22 Jul 2021 15:27:37 +0800 Subject: [PATCH] =?UTF-8?q?801.=20=E4=BA=8C=E8=BF=9B=E5=88=B6=E4=B8=AD1?= =?UTF-8?q?=E7=9A=84=E4=B8=AA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/6604636/ --- AcWing/801/801.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 AcWing/801/801.cpp diff --git a/AcWing/801/801.cpp b/AcWing/801/801.cpp new file mode 100644 index 00000000..f73ae9ff --- /dev/null +++ b/AcWing/801/801.cpp @@ -0,0 +1,15 @@ +#include + +using namespace std; + +int n, t; + +int main() { + cin >> n; + for (int i = 0; i < n; i++) { + cin >> t; + cout << __builtin_popcount(t) << ' '; + } + cout << endl; + return 0; +}