From the accept ratio, it seems this problem is easy.
But unfortunately, I still get Wrong Answer after several attempts.
Could someone provide some corner cases that we often ignore?
Besides, I have some assumptions, but don't know if it's always true.
1.About the input, assume the 3 pairs of numer is a0,a1,b0,b1,m0,m1,
can we assume that a0<= a1 and b0<=b1 and m0<=m1?
2.I guess a plays as a constant value, in other words, the answer is
always a multiplier of (amax-amin+1), right?
3.For each m, we decide it's odd or even. For odd m, we have to decide
how many b could be divided by m. For even m, we have to decide
how many b could be divided by m/2.
10787 - Modular Equations
Moderator: Board moderators