You are viewing a single comment's thread. Return to all comments →
Return type is int.One can't return "NO",therefore make changes in main function as below:
int result = fairRations(B); if(result==-1) bufferedWriter.write("NO"); else bufferedWriter.write(String.valueOf(result));
Seems like cookies are disabled on this browser, please enable them to open this website
Fair Rations
You are viewing a single comment's thread. Return to all comments →
Return type is int.One can't return "NO",therefore make changes in main function as below:
int result = fairRations(B); if(result==-1) bufferedWriter.write("NO"); else bufferedWriter.write(String.valueOf(result));