https://leetcode.com/problems/number-of-employees-who-met-the-target/description/
1
2
3
4
5
6
7
8
9
|
class Solution:
def numberOfEmployeesWhoMetTarget(self, hours: List[int], target: int) -> int:
answer = 0
for hour in hours:
if hour >= target:
answer += 1
return answer
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 2393 Rook (0) | 2023.09.12 |
---|---|
백준 28235 코드마스터 2023 (0) | 2023.09.11 |
leetcode 2744. Find Maximum Number of String Pairs (0) | 2023.07.13 |
leetcode 2769. Find the Maximum Achievable Number (0) | 2023.07.13 |
leetcode 2739. Total Distance Traveled (0) | 2023.07.07 |
댓글