Simple Python Solution | Beats 100% and 78%
Code


# Code
```python3 []
class Solution:
    def minCostSetTime(self, startAt: int, moveCost: int, pushCost: int, targetSeconds: int) -> int:
        target_min, target_sec = targetSeconds // 60, targetSeconds % 60
        combinations = []
        ans = float('inf')
        while target_sec <= 99:
            if target_min > 99:
                target_sec += 60
                target_min -= 1
                continue
            s = ''
            if target_min:
                s += str(target_min)
            if target_min:
                if target_sec < 10:
                    s += '0' + str(target_sec)
                else:
                    s += str(target_sec)
            else:
                if target_sec:
                    s += str(target_sec)
            combinations.append(s)       
            target_sec += 60
            target_min -= 1
        startAt = str(startAt)
        for combination in combinations:
            curr_pos = startAt
            curr_cost = 0
            for i in combination:
                if i != curr_pos:
                    curr_cost += moveCost
                curr_cost += pushCost
                curr_pos = i
            ans = min(ans, curr_cost)
        return ans
```
['Math', 'Python3']