You are viewing a single comment's thread. Return to all comments →
I also encountered wrong answer in the 3rd test case. Thus I tried below ways which actually works
int TotalCost = (int)round(totalCost);
Though I am checking if any smarter solution on it?
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
I also encountered wrong answer in the 3rd test case. Thus I tried below ways which actually works
int TotalCost = (int)round(totalCost);
Though I am checking if any smarter solution on it?