WA in "Chefina and Sums" (CFINASUM)

problem link
Mysolution

Please help

Refer Editorial.
As per your code i don’t see where are you using mod_inverse and mod_pow.
Note - I don’t know java well.

1 Like

Mod and Mod_inverse are not in use these two things are part of my template. main part of the code is the solved function please help