Ad
  • Default User Avatar

    fixed by ejini战神

  • Default User Avatar

    When you take the modulus of a number, there is going to be a case when the return value is equal to zero. For example, 0 modulo 6 is 0. As well, 6 modulo 6 is also 0. Any mulitple of 6 will return a modulo of zero, thus you have to check for that case. The cases you hightlighted above, however extend from 1 through 6. You are off by a factor of 1. Shift everything down, so have a case zero through case 5. Case 6 will never occur from what I see.