def solve(grades):
    """
    Return grades rounded up to nearest 5 if above 38, otherwise, do not round
    the score.
    """

    rounded_grades = []
    for grade in grades:
        if grade >= 38:
            rounded = ((grade + 5) / 5) * 5
            if rounded - grade < 3:
                grade = rounded
        rounded_grades.append(grade)

    return rounded_grades