⌘K
Flycodx

Pharmacy Inventory Stock Alert

Pharmacy Inventory Stock Alert

MediumArrays100% accepted

A Pune pharmacy chain tracks medicine stock in their inventory array. After daily sales (given in a separate array), the manager must identify which medicines fell below the critical stock threshold of 50 units and need immediate reorder.

Approach

Given initial stock quantities and sales amounts, find the count of medicines with remaining stock below 50 units after sales.

Input

n=6 stock=[100,75,200,45,80,120] sales=[30,20,150,30,50,80]

Output

3
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