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

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


50539 - Number of Chairs - 2

Гость
• Обсуждение задачи (1)

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

• 50527 - Sum of LCMs
• 50440 - Call Center
• 50342 - 100 Factorial
• 50439 - Telephone Calls
• 50436 - Pocket Money
• 50379 - a^b modulus k
• 50353 - Cube of the Largest number
• 50359 - Mode of a Series
• 50539 - Number of Chairs - 2
• 50532 - Close City
• 50462 - Class Average (3 Grades)
• 50288 - Even numbers in even posit...
• 50372 - Number Quadruplets
• 51007 - Function f(x)
• 50896 - Sum of Even Numbers
• 50903 - Basic Math Calculator
• Cineplexx

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Number of Chairs - 2

Question: Mr. Shehu is preparing for the wedding ceremony of his son. He wants to arrange the event in their garden. But he doesn't have enough tables and chairs at home. He has asked tables and chairs from his neighbors.

Given the widths and lengths of n rectangular tables and square chairs, find out how many chairs can fit around all the tables?

Input specification
First you will be given an integer (n), the number of table-chair pairs. Then in the following n lines, you will be given three integers: the width (tw) and length (tl) of the table and the width of a chair (cw) where 9 cm ≤ (tw and tl) ≤ 280 cm and 15 cm ≤ cw ≤ 40 cm.
Note: All chairs around one table have the same square shape.

Output specification
Find and show the number of chairs that can be placed around all the tables.

Sample Input I   
4
70 40 20
80 50 25
65 37 22
92 45 21
Sample Output I   
38

Explanation: There can be 10 chairs placed around the first table.
(70/20=>3 and 40/20=2 and (3+2)x2 =10)
Similarly, 10, 6, 12 can be placed around the other tables.

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

www.contester.ru