• + 0 comments

    There are three python ways to solve this in the code below:

    # count = 0
        # for stu in a:
        #     if stu <=0:
        #         count+=1
        # count = sum(stu <= 0 for stu in a)
        
        return "NO" if sum(stu <= 0 for stu in a) >= k else "YES"