Created
February 6, 2016 08:18
-
-
Save yukirin/a732510c4bcdd625339a to your computer and use it in GitHub Desktop.
Goであると思ってたけど、なかった関数、定数 gcd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func gcd(x, y uint64) uint64 { | |
for ; y != 0; y, x = x%y, x { | |
} | |
return x | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment