Easy solution to understand
Code\n\nclass Solution {\npublic:\n    int numberOfRounds(string s, string f) {\n        stringstream geek(s.substr(0,2));\n        int x = 0;\n        geek>>x;
# Code\n```\nclass Solution {\npublic:\n    int numberOfRounds(string s, string f) {\n        stringstream geek(s.substr(0,2));\n        int x = 0;\n        geek>>x;\n        stringstream geek1(f.substr(0,2));\n        int y = 0;\n        geek1>>y;\n        stringstream geek2(s.substr(3,2));\n        int x1 = 0;\n        geek2>>x1;\n        stringstream geek3(f.substr(3,2));\n        int y1 = 0;\n        geek3>>y1;\n        int m=0;\n        int t=0;\n        if(x>y){\n            m=(24-x-1+y)*4;\n        }\n        else if(x==y && y1>x1){\n            m=0;\n            t=1;\n        }\n        else if(x==y && x1>y1){\n            m=23*4;\n        }\n        else{\n            m=(y-x-1)*4;\n        }\n        if(t==1){\n            if(x1>y1 && x!=y){\n                int b=ceil((x1-y1)/15.0);\n                // cout<<b;\n                m+=96-b;\n                return m;\n            }\n            // cout<<x1<<y1;\n            y1-=y1%15;\n            if(x1%15!=0)\n            x1+=(15-x1%15);\n            if(y1>x1)\n            m+=(y1-x1)/15;\n            return m;\n        }\n        m+=y1/15;\n        x1=60-x1;\n        m+=x1/15;\n        return m;\n    }\n};\n```
['C++']