Question available in descriptionšŸ‘‡šŸ‘‡ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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..

28th Jun 2019, 1:47 AM
Shashi Gupta
Shashi Gupta - avatar
3 Respostas
+ 5
Sorry, I can't see the question? It reads like instructions to a code challenge? Do you want someone to code this?
28th Jun 2019, 3:16 AM
jay
jay - avatar
+ 4
Where is the question?
28th Jun 2019, 2:35 AM
jay
jay - avatar
+ 4
Ques is in description
28th Jun 2019, 3:14 AM
Shashi Gupta
Shashi Gupta - avatar