We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here’s your updated solution with twitchclip added cleanly in the docstring/comment:
vector<int>gradingStudents(vector<int>grades){vector<int>result;for(intgrade:grades){if(grade<38){// No rounding for failing gradesresult.push_back(grade);}else{intnextMultipleOf5=((grade/5)+1)*5;if(nextMultipleOf5-grade<3){result.push_back(nextMultipleOf5);// round up}else{result.push_back(grade);// no change}}}returnresult;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Grading Students
You are viewing a single comment's thread. Return to all comments →
Here’s your updated solution with twitchclip added cleanly in the docstring/comment: