➽ Problem:-

https://www.hackerrank.com/challenges/grading/problem

➽ Solution:-

import math

import os

import random

import re

import sys

 

num = int(input().strip())

for i in range(num):

    grades = int(input().strip())

    if grades >= 38 and grades % 5 >= 3:

        grades += 5 - grades % 5

    print(grades)