GDCOFTI - Greatest Common Divisor Of Three Integers
It is said that the greatest common divisor (GCD) of two or more whole integers, is the largest integer that divides them without leaving residue. Euclid's algorithm is famous for allowing to find the GCD between two integers. This challenge asks you, you find the GCD between three integers.
The entry consists of 3 whole non-negative integers (< 264), one per line and the output will be the GCD of the three integers.
Examples
Input: 426 132 120 Output: 6
Input: 100 60 120 Output: 20
Input: 4 8 12 Output: 4
hide comments
rzh123:
2021-10-16 04:18:20
So easy! |
|
sahil_19:
2020-04-26 18:09:17
Just take me 2 min to write the code #EAZY ONE Last edit: 2020-04-26 18:09:59 |
|
castor21:
2018-06-03 12:20:48
what is the use of commenting one go -_- |
|
imkiller:
2018-06-03 09:31:28
One Go Boom!!
|
|
m_sundriyal:
2018-03-21 11:57:48
I know how to add two numbers.
|
|
sanjana_17:
2018-01-05 12:37:47
easiest!! |
|
sanyam19:
2018-01-04 19:50:22
easiest 1..... :) |
|
vishalsingh17:
2018-01-04 18:28:42
One Go Boom!! |
|
sonuverma:
2018-01-04 17:39:19
Easy one :-) |
|
leurdieu:
2017-09-25 17:24:57
Excellent!! |
Added by: | Alexander Narváez |
Date: | 2016-07-26 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 GOSU |