For all test cases


#1

You need to convert sum, bestSum to long long