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

Сборники > Фёдор Меньшиков. Тренировки > задача:


50336 - Buying Carpets

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

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

• 080. 50248 - Power of two
• 090. 50456 - nth Digit of a Number
• 110. 50288 - Even numbers in even...
• 115. 50425 - Calculating Weekly Pay
• 120. 50426 - Calculating Sales
• 50312 - Sales Bar Chart
• 50313 - Pattern Displays
• 50316 - Population Bar Chart
• 50336 - Buying Carpets
• 50295 - Weighted Average
• 003. 50358 - Series of Odd Numbers
• 005. 50297 - Divisible By Five
• 012. 50589 - Numri i vezeve te shitura
• 030. 50584 - Pagesa totale
• 050. 50450 - Last Appereance of a ...
• 060. 50362 - Pythagorean Numbers
• 060. s

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

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

Лимит времени 4000/7000/7000/7000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared By Ibrahim Mesecan.

Buying Carpets

Uncle of Mr. Gentjan Bajrami has passed away leaving a great castle to his only cousin Mr. Bajrami. The castle is very large and has a lot of rooms. Mr. Bajrami wants to change the carpets in the rooms. He has measured and taken notes for the rooms and now he wants to see how many metre square of carpet he needs.

Write a program that is going to read the size of rooms and calculate the size of the carpet needed to buy.

Input specification
The first line has an integer number (n) which shows the number of rooms where 1 ≤ n ≤ 1000. The following n lines contain integer number pairs (width and depth), where 1 ≤ width, depth ≤ 20.

Output specification
Show one number that represent the size (in m2) of the carpet needed to buy.

Sample Input:
  3
  5 2
  4 3
  4 2

Sample Output:
  30

Output Explanation:
   Total size of the carpet = ((5 * 2) + (4 * 3) + (4 * 2)) = 30


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

www.contester.ru