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

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


50539 - Number of Chairs - 2

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

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

• 50980 - The smallest rectangle
• 50932 - Shifting rows and columns
• 50933 - Sum of the Biggest Neighbors
• 50834 - The train which leaves the f...
• 51003 - Double Prime
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50353 - Cube of the Largest number
• 50539 - Number of Chairs - 2
• 50469 - Letter Grades
• 51012 - Palindrome-k
• 50559 - Faktoret e thjeshte te numrit
• 002. 50428 - Three Times
• 003. 50432 - Numbers and Squares
• 004. 50433 - Sum of Cubes
• 005. 50595 - Shuma e numrave
• 010. 50582 - Numri i shifrave

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

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