Simple C++: Straight forward math solution || 0 ms Faster than 100% ||Short code
\nclass Solution {\npublic:\n    int numberOfRounds(string login, string logout) {\n        int h1,m1,h2,m2;\n        string s="";\n       s=login.substr(0,2);\
```\nclass Solution {\npublic:\n    int numberOfRounds(string login, string logout) {\n        int h1,m1,h2,m2;\n        string s="";\n       s=login.substr(0,2);\n        h1=stoi(s);\n        s=login.substr(3,2);\n        m1=stoi(s);\n         s=logout.substr(0,2);\n        h2=stoi(s);\n         s=logout.substr(3,2);\n        m2=stoi(s);\n    int x1=m1,x2=m2;///storing original minutes in var\n        if(m1%15!=0)\n        {\n            int p=m1/15;\n            p++;\n            m1=p*15;\n        }\n         if(m2%15!=0)\n        {\n            int p=m2/15;\n            m2=p*15;\n        }\n        if(h1==h2 && x1<x2)  // special case if hour are equal \n        {\n            if(m2-m1<0)\n                return 0;\n            else\n                return (m2-m1)/15;\n        }\n        int sum1=h1*60+m1;\n        int sum2=h2*60+m2;\n       // cout<<sum1<<" "<<sum2;\n        if(sum1<=sum2)\n        {\n            return (sum2-sum1)/15;\n        }\n        else\n        {\n            sum1=1440-sum1;\n            return(sum1+sum2)/15;\n        }\n        \n    }\n};\n```
['C', 'C++']