no not about time complexity , the cost may exceed the range of int if the constraints on the cost are high .
change int to long long and then try submitting.
if fails then try submiting it on other plaforms where constraints and input/output are clearly mentioned.
