From 32a72cdeb4e6aecf2a44a0fd71ac7cd884d08c8c Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Thu, 16 Sep 2021 16:08:55 +0800 Subject: [PATCH] =?UTF-8?q?67.=20=E6=95=B0=E5=AD=97=E5=9C=A8=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=95=B0=E7=BB=84=E4=B8=AD=E5=87=BA=E7=8E=B0=E7=9A=84?= =?UTF-8?q?=E6=AC=A1=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/7757066/ --- AcWing/67/67.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 AcWing/67/67.cpp diff --git a/AcWing/67/67.cpp b/AcWing/67/67.cpp new file mode 100644 index 00000000..3f5cdbfc --- /dev/null +++ b/AcWing/67/67.cpp @@ -0,0 +1,10 @@ +class Solution { + public: + int getNumberOfK(vector& nums, int k) { + int ans = 0; + for (int i : nums) { + ans += i == k; + } + return ans; + } +};