#CCBCHBAHAI0000059. Grading Students (Grading Students)
Grading Students (Grading Students)
Grading Students (Grading Students)
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem
For each grade , , grades below are never rounded. For , let
be the smallest multiple of not below . If , replace by ; otherwise keep unchanged. Apply the rule independently to all grades.
Input
The first line contains . Each of the next lines contains one grade .
Output
Print the rounded grades, one per line.
Subtask
Subtask 1 (20 points): .
Subtask 2 (30 points): .
Subtask 3 (50 points): , .
Example
Input
4
73
67
38
33
Output
75
67
40
33
Explanation
The sample follows the definitions and rules above.