Created
August 27, 2019 10:23
-
-
Save Arnauld/d58944cf4f18918e591c9d0f7e99734e to your computer and use it in GitHub Desktop.
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
private static int gcd(int a, int b) { | |
BigInteger b1 = BigInteger.valueOf(a); | |
BigInteger b2 = BigInteger.valueOf(b); | |
BigInteger gcd = b1.gcd(b2); | |
return gcd.intValue(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment