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

Сборники > C. T. 2011 > задача:


GCF

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

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

• GCF
• Bfs
• Heap
• Chess
• Profits
• Tickets
• Flowers
• Triangle
• Istanbul

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

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

Лимит времени 1000/1000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Problem description

Given N positive integers. Write a program that computes the GCD (greatest common divisor) of these numbers.

Input

There is one number N on the first line (0 < n < 1001). On the second line there are N positive integers not bigger than 2*109.

Output

Write the GCD of given numbers .

Example

stdin stdout

5
125 80 67835 1000 90230

5

 

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

www.contester.ru