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

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


50013 - John's Tasks

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

• 50271 - Number of Right Triangles
• 50272 - Convert from Hex to Dec
• 50273 - Triangle Property
• 50274 - Sum of the series
• 50005 - Power of two
• 50007 - Even numbers in even posit...
• 50008 - Sum of odd numbers from ...
• 50012 - Number Pattern
• 50013 - John's Tasks
• 50023 - Missing Number
• 50031 - Separate Into Digits
• 50047 - Sum of the numbers from a...
• 50060 - Total Salary Paid
• 50069 - Sum of Odd Numbers
• 50074 - Molecules
• 50091 - Pocket Money
• 50109 - Class Average (3 Grades)

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Geri Gokaj. Сложность Альфа

John's Tasks

John is a married man. His wife is asking him to do N-tasks every N[a] days.

For example: He should wash the car every 3 days. Water the flowers every 2 days etc.

The user will be given the frequency of every tasks.

We accept that he performed all the tasks today. You need to write a program to find out after how many days he will perform all the tasks again in one day.

Input specification
-In the first line, you will enter the number of tasks(N) -In the following line, N integer numbers that represent the frequency of each task.

Output specification
The first day after today where he has to perform all the tasks again.

Sample Input I
4
3 2 4 5
Sample Input II
3
2 1 3
Sample Input III
8
3 5 7 11 13 17 21 20
Sample Output I
60
Sample Output II
6
Sample Output III
1021020


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

www.contester.ru