H4

Given some positive integers, what is their gcd?

Input: A nonempty array of positive integers.

Output: The greatest common divisor of those integers

Examples:

[3,6,7]->1
[4,4,8]->4
[15]   ->15

Languages, by Score

Languages, by Name


Back to Hole List

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License