aah okey, yes you’re right it means when we start from the first one and the last candy should be given to the last one the result of m%n + (s-1) = 0 in this case of 0 occurs when there is no remainder and means everyone got 1 candy and we start from distributing 1 not 0 that’s mean 0 is 3

i understand it don’t worry but i can’t explain it well

thanks a lot again for your help i really appreciate it

but why we need to reformulate the order even if both are logic and they’re the same I think: m % n + (s-1) === (s - 1 + m) % n
can you give any case when we need to work with the second one and not the first just to understand more?
for example (7, 19, 2) work just fine with m % n + (s-1)
I’m sorry if I ask a lot of question I just want to understand the problem well