FOURSQ -doubt in multiplication

I have doubt in fourth way of multiplication as given in the editorial .if a and b are long long types and suppose a=10^11 ,b=10^11 and p=10^12 then how can we directly multiply a*b as given in statement return a * b - k * p; It should over flow there.Can any one clear my doubt??

@manjunath1996 Similar question has been answered in the comments section of the FOURSQ-editorial link.

1 Like

got it!! Thanks.

1 Like