11746 - 231001_12/21_practice14-1   

Description

Input a positive integer n≤10

, and n positive integers p1, p2, …, pn and  find gcd(p1, p2, …, pn)

Please use recursions

Input

  • Input: Input a positive integer n, and n positive integers p1, p2, …, pn

  • Input format: See the sample I/O

Output

  • Output: An integer GCD

  • Output format: Change a new line at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss