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

Турниры > CEN111 Homeworks 2013-2015 > задача:


14-Fall2-10. 50510 - What floor are they?

CEN111 Homeworks 2013-2015

Старт: 10.янв.2015 в 10:00:00
Финиш: 10.янв.2015 в 15:00:00
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 13-Fall2-10. 50379 - a^b modulus k
• 13-Fall2-20. 50399 - Mobile Base Sta...
• 13-Fall2-40. 50401 - Sum of Odd N...
• 13-Fall2-50. 50400 - nth Row rth El...
• 14-Fall1-10. 50532 - Close City
• 14-Fall1-30. 50500 - Find Student
• 14-Fall1-40. 50511 - Class Average
• 14-Fall1-50. 50481 - Car Parking
• 14-Fall2-10. 50510 - What floor...
• 14-Fall2-20. 50504 - School contest
• 14-Fall2-30. 50523 - Total Tax to Pay
• 14-Fall2-40. 50514 - Bookkeeping
• 14-Fall2-50. 50534 - Top Trading C...
• 14-Fall2-60. 50487 - Radius of Inscr...
• 14-FallResit-20. 50407 - Missing Nu...
• 14-Spr2-10. 50426 - Calculating Sales
• 14-Spr2-20. 50425 - Calculating W...

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

Если у вас есть предложения или пожелания по работе 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