Created
December 7, 2018 08:36
-
-
Save leftrk/b9c2c79d38e755d1f5a98a66658ae4ed to your computer and use it in GitHub Desktop.
欧几里得算法
This file contains hidden or 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
| long long gcd(long long m, long long n) { | |
| while (n != 0) { | |
| long long rem = m % n; | |
| m = n; | |
| n = rem; | |
| } | |
| return m; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment