[C++] 0ms Faster than 100.00%, Clean
\nclass Solution {\npublic:\n    int minCostSetTime(int startAt, int moveCost, int pushCost, int targetSeconds) {\n        string min1 = to_string(targetSeconds
```\nclass Solution {\npublic:\n    int minCostSetTime(int startAt, int moveCost, int pushCost, int targetSeconds) {\n        string min1 = to_string(targetSeconds/60);\n        string sec1 = to_string(targetSeconds%60);\n        if(min1=="0")\n            min1 = "";\n        \n        if(min1!="" && sec1.size()==1)\n            sec1 = \'0\' + sec1;\n        cout<<min1<<sec1<<endl;\n        \n        string min2 = "";\n        string sec2 = "";\n\n        if(min1 != "")  {\n            min2 = to_string(stoi(min1) - 1);\n            sec2 = to_string(stoi(sec1) + 60);    \n        }\n        \n        if(sec2 != "" && stoi(sec2)>99)  {\n            min2 = "";\n            sec2 = "";\n        }\n        if(min2=="0")\n            min2 = "";\n        \n         if(min2!="" && sec2.size()==1)\n            sec2 = \'0\' + sec2;\n        \n                cout<<min2<<sec2<<endl;\n\n        \n        int cost1 = 0;\n        int cost2 = 0;\n        int st = startAt;\n        \n        for(auto &i: min1)  {\n            if(st != (i-\'0\'))\n                cost1+=moveCost;\n            st = i-\'0\';\n            cost1 += pushCost;\n        }\n        for(auto &i: sec1)  {\n            if(st != (i-\'0\'))\n                cost1+=moveCost;\n            st = i-\'0\';\n            cost1 += pushCost;\n        }\n        \n        st = startAt;\n        \n        for(auto &i: min2)  {\n            if(st != (i-\'0\'))\n                cost2+=moveCost;\n            st = i-\'0\';\n            cost2 += pushCost;\n        }\n        for(auto &i: sec2)  {\n            if(st != (i-\'0\'))\n                cost2+=moveCost;\n            st = i-\'0\';\n            cost2 += pushCost;\n        }\n        if(min1.size() + sec1.size() >4)  {\n            min1 = "";\n            sec1 = "";\n        }\n        if(min2.size() + sec2.size() >4)  {\n            min2 = "";\n            sec2 = "";\n        }\n        \n        if(min2=="" && sec2=="")\n            cost2 = INT_MAX;\n        if(min1=="" && sec1=="")\n            cost1 = INT_MAX;\n        int cost = min(cost1, cost2);\n        \n        return cost;\n            \n    }\n};\n```
['C', 'C++']