+ 4
Question available in description👇👇
Integer N represents the number of candies arranged in a circle,numbered from 0 to N−1. You will eat a candy and leave the wrapper. You shall begin eating with candy number 0. Then you omit the next M−1 candy or wrappers on the circle, and eat the following one. More precisely, if you ate candy number X, then you will next eat the candy with number(X +M) modulo N(remainderofdivision). You stop eating when you encounter an empty wrapper. For example, given integers N=10 and M=4. You will eat the following candy:0,4,8,2,6. Your answers should be 5 i.e. count the number of candy you ate..
4 Respuestas
+ 5
Sorry, I can't see the question? It reads like instructions to a code challenge?
Do you want someone to code this?
+ 4
Where is the question?
+ 4
Ques is in description