1/4对998244353取模后为748683265
(1/a)%p=a**(p-2)%p
def ad(a, b, c): d = 1 while(b): if b%2 == 1: d = (d*a)%c #(a*b)%c=((a%c)*(b%c))%c a = (a*a)%c b = b//2 return d p = 998244353 print(ad(4, p-2, p)) #等价于 #print(4**(p-2)%p)
748683265