RWA Monthly Maintenance Dues Calculator
RWA Monthly Maintenance Dues Calculator
EasyArrays100% accepted
Meera manages maintenance billing for a Pune residential welfare association. A resident Ravi has an array of monthly maintenance charges for the last 12 months, where 0 means unpaid. Find Ravi's total outstanding dues including unpaid months with default charge.
Approach
Given array of N monthly charges where 0 means unpaid and a default charge, calculate total outstanding dues.
Input
charges=[500,500,0,500,500,0,500]
default_charge=500
Output
3500
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