Linear Congruence error

My code passed only first 5 cases, please check my code here :

https://ide.codingblocks.com/s/341103

@shivanshu12800 hey just change line 58 with this line
x += ((rem[i] * pp * inverse)%prod);
otherwise all is fine.

still the same …

@shivanshu12800 hey it is passing all the test cases . try submitting again. if not share your code
see the ss

it didn’t passed all test cases , see the code : https://ide.codingblocks.com/s/341103

use long long everywhere.