Python:实现费马检测算法 def bin_exp_mod(a, n, b): # mod b assert not (b == 0), "This cannot accept modulo that is == 0"