You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it work correctly,
since what you add before is the remainder of m, it have to be smaller than m
So the step of modulos.get(i) %m is useless and meaningless, since modulos.get(i) always <=m
which means
modulos.get(i)%m equal to modulos.get(i)
The text was updated successfully, but these errors were encountered:
you could modify this code by changing
modulos.add((int) ((
modulos.get( i ) % m +
modulos.get(i + 1) % m ) % m));
to
modulos.add((int) ((
modulos.get( i ) +
modulos.get(i + 1) ) % m));
it work correctly,
since what you add before is the remainder of m, it have to be smaller than m
So the step of modulos.get(i) %m is useless and meaningless, since modulos.get(i) always <=m
which means
modulos.get(i)%m equal to modulos.get(i)
The text was updated successfully, but these errors were encountered: