第14343题 单选
以下Python实现的欧几里得算法(gcd函数)的平均时间复杂度是()
def gcd(N,M):
    return N if M == 0 else gcd(M, N % M)
A

O(N)

B

O(logN)

C

O(NlogN)

D

O(N²)