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

Разделы > Неотсортированные > задача:


GCF

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

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

• Primes
• Providers
• A to the power of B
• A Palace with Many Columns
• X to the power of Y
• A+B
• T-shirts
• SAME OR DIFFERENT
• GCF
• REVERSE ORDER OF WORDS
• Factorial
• Maximum
• Name-Surname
• Decimal to binary
• Heap
• Herons
• Leap Year

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

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