Ctrl K

Who Met the Weekly Norm

Easy
A shift has n workers. For each of them you know how many hours they put in this week: logged[i] is the hours of worker i. A week counts only if a worker logged at least norm hours. Return how many workers met the norm.
Example 1
logged=[7, 3, 8, 8, 2], norm=7 → 3

Three people reached 7 hours: 7, 8 and 8. Exactly 7 hours counts too.

Example 2
logged=[4, 1, 0], norm=5 → 0

Nobody reached 5 hours.

Example 3
logged=[0, 0], norm=0 → 2
Constraints
  • 1 ≤ len(logged) ≤ 50
  • 0 ≤ logged[i] ≤ 10⁵
  • 0 ≤ norm ≤ 10⁵
Have you seen this problem in a real interview?
Solved by0
Tried by0
Submissions0
Acceptance—
Topics
Similar problemsPair With a Target Sum EasySqueeze Repeats Out of a Sorted Array EasyDrop the Unwanted Value EasySlot on a Sorted Shelf EasyAdd One to a Digit Array Easy
loading Python…
Input
logged=[7, 3, 8, 8, 2], norm=7
Expected
3

Run checks the first 3 tests in your browser. Submit checks all 103 tests on the server, hidden ones included.