← Questions

Courier pay from order events

0
xAICodingLast asked Mar 2026

A delivery courier is paid for active time. You receive the events of their orders (for example accepted and delivered, with timestamps) as if from an upstream service. Compute the pay: a base rate per active minute, where the rate depends on how many orders are active at the same time. Treat the input as coming from another service, and validate it.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding