You can download this code by clicking the button below.
This code is now available for download.
This function accepts two integers as arguments and returns their greatest common divisor.
Technology Stack : Python built-in
Code Type : Function
Code Difficulty : Beginner
def aaaaaaa(arg1, arg2):
"""
计算两个数的最大公约数(GCD)。
"""
while arg2:
arg1, arg2 = arg2, arg1 % arg2
return arg1