题目:

class Solution {
public:
    int search(vector<int>& nums, int target) {
        int count=0;
        for(auto n:nums){
            if(n==target){
                count++;
            }
        }
        return count;
    }
};
posted on 2023-08-02 19:32  孜孜不倦fly  阅读(11)  评论(0)    收藏  举报