Jun 10, 2019 at 10:01am
From geeksforgeeks i found (a * b) % m = ((a % m) * (b % m)) % m
also (a / b) % m may NOT be same as ((a % m)/(b % m)) % m
Last edited on Jun 10, 2019 at 11:11am
Jun 10, 2019 at 10:36am
( x / y ) % m = ( ( x % m ) * power( y , m-2 ) )%m
i think you can solve ( ( a*b )/2 ) % m.
Jun 10, 2019 at 10:48am
thanks a lot that definitely helped me
Jun 10, 2019 at 10:52am
@iotaa
Are you trying to solve Chef an Ingredients
Jun 10, 2019 at 1:23pm
@Dum You solved chef an ingredients ? I am getting a WA in 1 sub task . Can you help me out with that test case ?
Jun 10, 2019 at 1:30pm
@TheTimes No
i am also getting 1 case wrong.