C++ straightforward 3 lines - LeetCode Discuss
https://leetcode.com/problems/the-number-of-full-rounds-you-have-played/discuss/1284240/C%2B%2B-straightforward-3-lines
Jun 20, 2021 . Solution 1. Convert the startTime and finishTime into minutes. If startTime > finishTime, add 24 hours to finishTime because we played overnight. Divide startTime and finishTime by 15, and round them UP and DOWN respectively. In this way we round the startTime and endTime to their next/previous closest 15-minute rounds, respectively.
DA: 35 PA: 92 MOZ Rank: 78