Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
What floor are they?
Mr. Arbi Cela works in National Post Services (NPS).
He distributes mails to the people. Sometimes he goes
to apartments buildings and has to find out the floor
number from the apartment number. In some
buildings, first several floors are reserved for the
shops. In some other buildings, apartment numbers
start from a basement floor. And thus, the apartment
numbers start from different floors.
Write a program that will find out
the floor number from the given data.
Input specification
In the beginning, you will be given 3 integers
- n: the number of apartments in this building
- m: the number of apartments in every floor
- k: starting floor number for the apartments
where 0 ≤ n ≤ 50, 1 ≤ m ≤ 10, -3 ≤ k ≤ 5.
Then, you will be given n space
separated apartment numbers in the following line
which are between 1 and 1000.
Output specification
Show n space-separated integers: the floor
numbers for every apartment given.
Sample Input I
4 6 3
32 3 22 17
|
Sample Output I
8 3 6 5
|
Explanation: For the apartment number: 22
- there are 6 apartments in every floor
- The apartment numbers start from the third floor
There are 6 apartments in the third floor, 6 in the
fourth floor and 6 floor in the fifth floor which makes
18 apartments. Then, the other 4 is in the sixth floor.
Для отправки решений необходимо выполнить вход.
|