GCD Of Array

Computer Mathematics Medium 3 views
Back to Questions

Problem Description

Given n and n integers, print gcd of all numbers.

Input Format

n then n integers.

Output Format

One integer gcd.

Sample Test Case

Input:
4 12 18 24 30
Output:
6

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next