Daily challenge for 2026-09-30
638. Parking Meter Remaining Time
You are managing a digital parking meter. The meter accepts coins of values 5, 10, and 25 cents. Every 5 cents buys exactly 2 minutes of parking time. Given a list of coin values coins inserted into the meter and the number of minutes spent parked so far, determine the remaining parking time in minutes.
If the time spent exceeds the purchased parking time, the remaining time should be 0.
Example:
Input: coins = [25, 10, 5], spent = 12
Output: 4
Explanation: Total money inserted is 25 + 10 + 5 = 40 cents. Total time purchased is (40 / 5) * 2 = 16 minutes. Remaining time is 16 - 12 = 4 minutes.
Run this challenge interactively in Python or JavaScript when the app loads.