intuitive pythonic approach
ApproachEasy and simple approachComplexity
Time complexity:
O(1)
Space complexity:
O(1)
Code
# Approach
Easy and simple approach
# Complexity
- Time complexity:
O(1)
- Space complexity:
O(1)
# Code
```python []
class Solution(object):
    def numberOfRounds(self, loginTime, logoutTime):
        """
        :type loginTime: str
        :type logoutTime: str
        :rtype: int
        """

        login_h, login_m = list(map(int, loginTime.split(":")))
        logout_h, logout_m = list(map(int, logoutTime.split(":")))

        total_hours = (logout_h - login_h)*60 
        
        if login_h > logout_h:
            total_hours += 24*60

        if login_h == logout_h and login_m > logout_m:
            total_hours += 24*60


        total_hours_session = total_hours // 15

        if login_m % 15 != 0:
            login_m = login_m // 15 * 15 + 15

        if logout_m % 15 != 0:
            logout_m = logout_m // 15 * 15

        total_mins_session = int((logout_m - login_m) / 15)
        rounds = total_hours_session + total_mins_session
        return rounds if rounds > 0 else 0

        
```
['Python']