⌘K
Flycodx

Highway Toll Peak Revenue Hours

Highway Toll Peak Revenue Hours

MediumArrays0% accepted

Mumbai-Pune expressway toll booth records hourly vehicle counts. Revenue team needs to identify peak revenue windows for dynamic pricing and staffing allocation decisions.

Approach

Given an array of hourly vehicle counts and window length L, find the maximum sum of any L consecutive hours.

Input

8 3 45 50 48 60 55 58 52 50

Output

173
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