Karatsuba算法(Python)
#Programming Assignment #1
#what's the product of the following two 64-digit numbers?
#Using karatsuba multiplication algorithm
def Karatsuba(x,y):
if (len(str(x))) < 2 or (len(str(y))) < 2:
return x*y
else:
#m这里不确定是否可以任意设.
原创
2022-01-19 21:16:08 ·
557 阅读 ·
0 评论