{"trustable":false,"sections":[{"title":"Description","value":{"format":"MD","content":"HackerLand University has the following grading policy:\n- Every student receives a $grade$ in the inclusive range from $0$ to $100$.\n- Any $grade$ less than $40$ is a failing grade.\n\nSam is a professor at the university and likes to round each student\u0027s $grade$ according to these rules:\n- If the difference between the $grade$ and the next multiple of $5$ is less than $3$, round $grade$ up to the next multiple of $5$.\n- If the value of $grade$ is less than $38$, no rounding occurs as the result will still be a failing grade.\n\nThere are $N$ students in Sam\u0027s class. Grade from the $i$-th student denoted by $G_i$. Calculate all the new student\u0027s grades according to Sam\u0027s rule."}},{"title":"Input Format","value":{"format":"MD","content":"The first line contains a single integer $N$, the number of students.\nThe next $N$ lines contain a single integer $G_i$, the grade from $i$-th students."}},{"title":"Output Format","value":{"format":"MD","content":"$N$ lines that contain a single integer that denotes a new student\u0027s grade according to Sam\u0027s rule."}},{"title":"Constraints","value":{"format":"MD","content":"- $1 \\leq N \\leq 60$\n- $0 \\leq G_i \\leq 100$"}},{"title":"Sample Input","value":{"format":"MD","content":"4\n73\n67\n38\n33"}},{"title":"Sample Output","value":{"format":"MD","content":"75\n67\n40\n33"}},{"title":"Explanation","value":{"format":"MD","content":"![](https://vj.csgrandeur.cn/d68d996c62622188cd8f4a53ef4a3437?v\u003d1657694235)\n\n1. Student $1$ received a $73$, and the next multiple of $5$ from $73$ is $75$. Since $75-73\u003c3$, the student\u0027s grade is rounded to $75$.\n1. Student $2$ received a $67$, and the next multiple of $5$ from $67$ is $70$. Since $70-67\u003d3$, the grade will not be modified and the student\u0027s final grade is $67$.\n1. Student $3$ received a $38$, and the next multiple of $5$ from $38$ is $40$. Since $40-38\u003c3$, the student\u0027s grade will be rounded to $40$.\n1. Student $4$ received a grade below $38$, so the grade will not be modified and the student\u0027s final grade is $33$."}}]}