ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Арифметика > задача:


50510 - What floor are they?

Гость
• Вопросы к жюри (1)

Задачи раздела

• 50369 - Base Conversion
• 50407 - Missing Number
• 51003 - Double Prime
• 50807 - Euro to Leke
• 50433 - Sum of Cubes
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 50435 - City Electric Bills
• 50527 - Sum of LCMs

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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.



Для отправки решений необходимо выполнить вход.

www.contester.ru