O(1) SC & TC || Simple & Easy C++ Solution
\nFor any given targetSeconds given we will have ony two possible times \n\n\t1)  targetSecoond/60    :    targetSecoond%60\n\t2)  targetSecoond/60 - 1   :    t
\nFor any given targetSeconds given we will have ony two possible times \n\n\t1)  targetSecoond/60    :    targetSecoond%60\n\t2)  targetSecoond/60 - 1   :    targetSecoond%60   + 60\nSo we just need to calculate these two time and check whether they are valid or not i.e lies between 00:00 and 99:99.\n\nAfter that we can cacluate the cost for all the valid times (atmost two) by ignoring all the leading zeroes.\n\n\tTime Complexity  : O(1)\n\tSpace Complecity : O(1)\n\n\n```\nvoid numtovec(int n, vector<int> &v)\n{\n   v.push_back(n / 10);\n   v.push_back(n % 10);\n}\n\nint ans(int x, vector<int> &time, int moveCost, int pushCost)\n{\n   int cst = 0, j, i;\n   for (j = 0; j < time.size(); j++)\n      if (time[j] != 0)\n         break;\n   for (i = j; i < time.size(); i++)\n   {\n      if (time[i] != x)\n         cst += moveCost;\n      cst += pushCost;\n      x = time[i];\n   }\n   return cst;\n}\nclass Solution {\npublic:\n   int minCostSetTime(int startAt, int moveCost, int pushCost, int targetSeconds) {\n      vector<int> time1, time2;\n\n      // Time 1\n      int minute1 = targetSeconds / 60, second1 = targetSeconds % 60;\n      numtovec(minute1, time1);\n      numtovec(second1, time1);\n      int cost1 = ans(startAt, time1, moveCost, pushCost);\n\n      //Time 2\n      int minute2 = minute1 - 1, second2 = second1 + 60;\n      numtovec(minute2, time2);\n      numtovec(second2, time2);\n      int cost2 = ans(startAt, time2, moveCost, pushCost);\n\n\n      if (minute1 < 0 || minute1 > 99 || second1 < 0 || second1 > 99)\n         cost1 = INT_MAX;\n      if (minute2 < 0 || minute2 > 99 || second2 < 0 || second2 > 99)\n         cost2 = INT_MAX;\n      return min(cost1, cost2);\n   }\n};\n```\n
['C']