0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-09 01:38:48 +00:00
OI-codes/AcWing/67/67.cpp

11 lines
192 B
C++
Raw Normal View History

class Solution {
public:
int getNumberOfK(vector<int>& nums, int k) {
int ans = 0;
for (int i : nums) {
ans += i == k;
}
return ans;
}
};