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

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


50797 - Nr of Missing Guests

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

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

• 51003 - Double Prime
• 50807 - Euro to Leke
• 50433 - Sum of Cubes
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50539 - Number of Chairs - 2
• 50532 - Close City

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

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

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

Nr of Missing Guests

You are organizing a meeting and there are 4 tables of people. Different number of people are going to sit around every table, a, b, c, and d. There are a few minutes to the meeting and you count current number of people sitting, k, l, m, and n.

Question: Calculate and show the number of missing people.

Input specification
Firstly, you will be given four integers: a, b, c, and d the number of people who can sit around each table. Then, you will be given four other numbers where all numbers are between 0 and 20.

Output specification
Show just one number: total number of missing people.

Sample Input 1
3 5 4 5
1 4 2 5
Sample Input 2
4 3 5 4
4 3 4 3
Sample Output 1
5
Sample Output 2
2

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

www.contester.ru