Simple Brute Force Solution   O(1)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n O(1)\n\n- Space complexity:\n O(1).\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minCostSetTime(int startAt, int moveCost, int pushCost, int targetSeconds) {\n        int mm = targetSeconds % 60, hh = targetSeconds / 60;\n        int ans = INT_MAX;\n\n        // First possibility: setting the time directly\n        if (hh < 100) { // Only valid if hh is less than 100 (two digits max)\n            int umm = mm / 10, lmm = mm % 10, uhh = hh / 10, lhh = hh % 10;\n            int cost1 = 0;\n            int currentPos = startAt;\n\n            // Handle each digit to calculate cost\n            if (uhh > 0) {\n                if (uhh != currentPos) {\n                    cost1 += moveCost;\n                    currentPos = uhh;\n                }\n                cost1 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0) {\n                if (lhh != currentPos) {\n                    cost1 += moveCost;\n                    currentPos = lhh;\n                }\n                cost1 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0 || umm > 0) {\n                if (umm != currentPos) {\n                    cost1 += moveCost;\n                    currentPos = umm;\n                }\n                cost1 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0 || umm > 0 || lmm > 0) {\n                if (lmm != currentPos) {\n                    cost1 += moveCost;\n                    currentPos = lmm;\n                }\n                cost1 += pushCost;\n            }\n\n            ans = cost1;\n        }\n\n        // Second possibility: adjusting time (subtract 1 minute from hh and add 60 to mm)\n        if (hh > 0 && mm + 60 < 100) {\n            hh -= 1;\n            mm += 60;\n            int umm = mm / 10, lmm = mm % 10, uhh = hh / 10, lhh = hh % 10;\n            int cost2 = 0;\n            int currentPos = startAt;\n\n            // Handle each digit to calculate cost\n            if (uhh > 0) {\n                if (uhh != currentPos) {\n                    cost2 += moveCost;\n                    currentPos = uhh;\n                }\n                cost2 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0) {\n                if (lhh != currentPos) {\n                    cost2 += moveCost;\n                    currentPos = lhh;\n                }\n                cost2 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0 || umm > 0) {\n                if (umm != currentPos) {\n                    cost2 += moveCost;\n                    currentPos = umm;\n                }\n                cost2 += pushCost;\n            }\n\n            if (uhh > 0 || lhh > 0 || umm > 0 || lmm > 0) {\n                if (lmm != currentPos) {\n                    cost2 += moveCost;\n                    currentPos = lmm;\n                }\n                cost2 += pushCost;\n            }\n\n            ans = std::min(ans, cost2);\n        }\n\n        return ans;\n    }\n};\n\n```
['C++']