⌘K
Flycodx

Maintenance Charge Slab Calculator

Maintenance Charge Slab Calculator

MediumArrays100% accepted

The RWA in Delhi calculates maintenance charges based on flat size categories using tiered pricing. Calculate the total maintenance bill for all residents.

Approach

Given an array of flat sizes and tiered rate slabs, calculate the total maintenance charges by applying the appropriate rate to each flat.

Input

flatSizes=[500,800,1200], rates=[[0,600,100],[601,1000,150],[1001,2000,200]]

Output

410000
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