Seconds to Midnight

Easy · rating 900 · Math

Read a 24-hour time as h m s. Print the number of seconds until the next midnight (00:00:00). At exactly midnight, print a full day.

Constraints: 0 ≤ h < 24, 0 ≤ m, s < 60

Related problems

Open Seconds to Midnight in Code Arena →