You are viewing a single comment's thread. Return to all comments →
Here is Python 3 solution from my HackerrankPractice repository:
for _ in range(int(input())):
grade = int(input())
if grade >= 38 and grade % 5 >= 3:
grade = (grade + 5) // 5 * 5
Feel free to ask if you have any questions :)
Why do you add 5 to grade?