C++ straightforward
For a given time point h:m, we can calculate the number of full round between 00:00 to h:m easily, which is N(h, m) = h * 4 + m / 15.\nNow let startTime be h0:m
For a given time point `h:m`, we can calculate the number of full round between `00:00` to `h:m` easily, which is `N(h, m) = h * 4 + m / 15`.\nNow let `startTime` be `h0:m0` and finishTime be `h1:m1`, we calculate their difference `N(h1,m1) - N(h0,m0)`. Furthermore, if `m0 % 15 != 0`, we should remove 1 round, as the player does not fully play the first round.\nThere are two edge cases:\n1. when `h1:m1 < h0:m0`, the player is playing overnight, we can just replace `h1` with `h1 + 24`.\n2. when `N(h1,m1) - N(h0,m0) == 0`, in this case we should not remove the first round whne `m0 % 15 != 0` as `-1` will not be a valid answer. In this case we just return `0`.\n\n```\nclass Solution {\npublic:\n    int fullRoundBefore(int h, int m) {\n        return h * 4 + m / 15;    \n    }\n    \n    int numberOfRounds(string startTime, string finishTime) {\n\t\t// Time O(1), Space O(1)\n        int h0 = stoi(startTime.substr(0,2));\n        int m0 = stoi(startTime.substr(3,2));\n        int h1 = stoi(finishTime.substr(0,2));\n        int m1 = stoi(finishTime.substr(3,2));\n        if (h1 < h0 or (h1 == h0 and m1 < m0)) {\n            h1 += 24;\n        }\n        return max(0, fullRoundBefore(h1, m1) - fullRoundBefore(h0, m0) - (m0 % 15 != 0));\n    }\n};\n```
['C++']