Junyeong's Grade
Time limit1sMemory limit1024 MB
Given each rank G_i among N students, the task maps the integer part of G_i times 100 divided by N to a grade from 1 to 9 for each of K subjects.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
Junyeong received his report card after finishing the first semester at Sunrin Internet High School. The school has not finished grade processing yet, so the card shows only his rank and not his grade. Calculating grades is tedious, so let's compute his grade for him.
Sunrin Internet High School has students and subjects, and every student takes all subjects. Junyeong's grade is based on a percentage. The percentage in a subject equals the integer part of his rank in that subject multiplied by and divided by the number of students. If the percentage in a subject is , the conditions for each grade are as follows.
In subject (), Junyeong ranked . Given , find the grades () that Junyeong received in each subject.
Input
The first line contains the number of students and the number of subjects , separated by a space.
The second line contains integers , separated by spaces.
All numbers in the input are integers.
Output
On the first line, print integers , separated by spaces, where each value is Junyeong's grade in the corresponding subject.