⌘K
Flycodx

Blood Bank Expiry Alert Management

Blood Bank Expiry Alert Management

MediumArrays50% accepted

Mumbai's Red Cross blood bank maintains critical inventory protocols. Identify blood units expiring soon to prioritize their clinical use and minimize waste of life-saving resources.

Approach

Given an array of days-until-expiry for blood units and alert threshold, count how many units expire within the threshold.

Input

8 7 15 3 21 5 8 2 30 1

Output

4
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3