• + 0 comments

    Java:

    // Write your code here

    List<Integer> result = new ArrayList();
    
        for(Integer grade : grades) {
            if(grade%5 > 2 && grade > 37) {
                result.add(5 * (grade/5 +1));
            } else {
                result.add(grade);
            }
        }
    
        return result;