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

Сборники > Задачи со всего света > задача:


050. 50510 - What floor are they?

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

Задачи сборника

• 50469 - Letter Grades
• 50539 - Number of Chairs - 2
• 003. 50432 - Numbers and Squares
• 004. 50433 - Sum of Cubes
• 005. 50595 - Shuma e numrave
• 016. 50459 - The Biggest Digit
• 020. 50575 - Numri i numrave prim
• 030. 50576 - Numri i numrave perfekte
• 050. 50510 - What floor are they?
• 050. 50566 - Mesatarja e pikeve te ...
• 066. 50523 - Total Tax to Pay
• 070. 50534 - Top Trading Company
• 095. 50453 - The Cubic Difference
• 125. 50578 - Numrat Prim Mersenne
• 132. 50474 - Sum of Two Primes
• 165. 50577 - Numrat perfekte dhe ...
• 190. 50533 - Contacts List

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

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