НОД

1
2
3
4
5
6
7
8
#!/usr/bin/env python
#-*-coding:utf8-*-
def nod(x=input("X: "), y=input("Y: ")):
if y == 0:
return x
else:
return nod(y, x % y)
print nod()