c++ | easy | short
\n\n# Code\n\nclass Solution {\npublic:\n    int numberOfRounds(string loginTime, string logoutTime) {\n        int INtime = ((loginTime[0]-\'0\')*10+loginTime[
\n\n# Code\n```\nclass Solution {\npublic:\n    int numberOfRounds(string loginTime, string logoutTime) {\n        int INtime = ((loginTime[0]-\'0\')*10+loginTime[1]-\'0\')*60 + (loginTime[3]-\'0\')*10+loginTime[4]-\'0\';\n        int OUTtime = ((logoutTime[0]-\'0\')*10+logoutTime[1]-\'0\')*60 + (logoutTime[3]-\'0\')*10+logoutTime[4]-\'0\';\n        if(OUTtime < INtime)\n        {\n            OUTtime += 1440;\n        }\n        if(INtime%15 != 0)\n        {\n            int val = INtime/15;\n            INtime = (val+1)*15;  \n        }\n        return abs(OUTtime-INtime)/15;\n    }\n};\n```
['C++']