• + 5 comments

    Python3 one-liner:

    grades = [int(input()) for __ in range(int(input()))]

    [print(g+5 - g%5 if g%5 > 2 and g>37 else g) for g in grades]