Deepak and his journey


all the testcases are wrong but it is all correct at testing…
can you spot the error.

You need just multiply the minimum cost till ith position with the amount of petrol in ith position and calculate their sum.

@Ankit003 did u check my code ? I am doing the exact same thing …

Yup Your code is looking fine. Change datatype of int to long long and then try.