<pre><code>def gcdIter(a, b):
'''
a, b: positive integers
returns: a positive integer, the greatest common divisor of a & b.
'''
test = 0
if a > b:
b = test
else:
a = test
while test != 1:
if a%test == 0 and b%test == 0:
return test
test -= 1
return 1
</code></pre>
<p>为什么我要求a&b的最大公约数,结果会出错呢?在</p>