You are participating in an online chess tournament. There is a chess round that starts every 15 minutes. The first round of the day starts at 00:00, and after every 15 minutes, a new round starts.


	For example, the second round starts at 00:15, the fourth round starts at 00:45, and the seventh round starts at 01:30.


You are given two strings loginTime and logoutTime where:


	loginTime is the time you will login to the game, and
	logoutTime is the time you will logout from the game.


If logoutTime is earlier than loginTime, this means you have played from loginTime to midnight and from midnight to logoutTime.

Return the number of full chess rounds you have played in the tournament.

Note:&nbsp;All the given times follow the 24-hour clock. That means the first round of the day starts at 00:00 and the last round of the day starts at 23:45.

&nbsp;
Example 1:

Input: loginTime = "09:31", logoutTime = "10:14"
Output: 1
Explanation: You played one full round from 09:45 to 10:00.
You did not play the full round from 09:30 to 09:45 because you logged in at 09:31 after it began.
You did not play the full round from 10:00 to 10:15 because you logged out at 10:14 before it ended.


Example 2:

Input: loginTime = "21:30", logoutTime = "03:00"
Output: 22
Explanation: You played 10 full rounds from 21:30 to 00:00 and 12 full rounds from 00:00 to 03:00.
10 + 12 = 22.


&nbsp;
Constraints:


	loginTime and logoutTime are in the format hh:mm.
	00 &lt;= hh &lt;= 23
	00 &lt;= mm &lt;= 59
	loginTime and logoutTime are not equal.


class Solution:
    def numberOfRounds(self, startTime: str, finishTime: str) -> int:
        hs, ms = (int(x) for x in startTime.split(":"))
        ts = 60 * hs + ms
        hf, mf = (int(x) for x in finishTime.split(":"))
        tf = 60 * hf + mf
        if 0 <= tf - ts < 15: return 0 # edge case 
        return tf//15 - (ts+14)//15 + (ts>tf)*96
class Solution {
    public int numberOfRounds(String loginTime, String logoutTime) {
        String[] arr1 = loginTime.split(":");
        String[] arr2 = logoutTime.split(":");

        int time1 = Integer.parseInt(arr1[0])*60 + Integer.parseInt(arr1[1]);
        int time2 = Integer.parseInt(arr2[0])*60 + Integer.parseInt(arr2[1]);

        if(time1 > time2) time2 = time2 + 24*60;
        if(time1%15 != 0) time1 = time1 + 15-time1%15;

        return (time2 - time1)/15;
    }
}
class Solution {
public:
    int solve(string s)
    {
        int hour=stoi(s.substr(0,2));
        int min=stoi(s.substr(3,5));
        return hour*60+min;
    }
    int numberOfRounds(string loginTime, string logoutTime) {
        int st=solve(loginTime);
        int et=solve(logoutTime);
        int ans=0;
        if(st>et) et=et+1440;
        if(st%15!=0) st=st+(15-st%15);
        ans=(et-st)/15;
        return ans;
    }
};
var numberOfRounds = function(loginTime, logoutTime) {
    const start = toMins(loginTime);
    const end = toMins(logoutTime);

    let roundStart = Math.ceil(start / 15);
    let roundEnd = Math.floor(end / 15);

    if (start < end) {
        return Math.max(0, roundEnd - roundStart);
    }
    else {
        roundEnd += 96;
        return roundEnd - roundStart;
    }

    function toMins(timeStr) {
        const [hh, mm] = timeStr.split(":");

        let totMins = 0;

        totMins += parseInt(hh) * 60;
        totMins += parseInt(mm);

        return totMins;
    }
};
The Number of Full Rounds You Have Played