C# simple solution
Complexity\n- Time complexity:\no(1)\n\n- Space complexity:\no(1)\n\n# Code\n\npublic class Solution {\n    public int NumberOfRounds(string loginTime, string l
# Complexity\n- Time complexity:\n$$o(1)$$\n\n- Space complexity:\n$$o(1)$$\n\n# Code\n```\npublic class Solution {\n    public int NumberOfRounds(string loginTime, string logoutTime) {\n        var t1 = ToInt(loginTime);\n        var t2 = ToInt(logoutTime);\n        if (t2 < t1)\n            t2 += 60*24;\n        if (t1%15 != 0)\n            t1 += 15-t1%15;\n        if (t2 % 15 != 0)\n            t2 = (t2/15) * 15;\n        if (t1 > t2)\n            return 0;\n        return (t2-t1) / 15;\n    }\n\n    private int ToInt(string time) {\n        var sp = time.Split(":");\n        return int.Parse(sp[0]) * 60 + int.Parse(sp[1]);\n    }\n}\n```
['C#']