Ration Shop Fair Distribution Per Capita
Ration Shop Fair Distribution Per Capita
EasyArrays100% accepted
Arjun distributes ration at a Delhi government shop. He has 100 units of rice to divide equally among 5 families with members [2, 3, 2, 1, 2]. Each family member gets equal rice regardless of family size.
Approach
Given an array of N family member counts and total ration units, calculate equal ration per individual.
Input
5 100
2 3 2 1 2
Output
10
More Arrays problems
Browse all coding problems →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