Josephus Problem Problem 32

Back to General discussions forum

CurioFibo     2022-09-17 18:29:06

Hello guys,

I don't know why my code givens an answer diferent from the answer gives by site.

I' m Looking Foward any help.

Thanks!

gardengnome     2022-09-18 08:44:02
User avatar

The problem statement includes a full example for n=10 and k=3. Use those inputs for your program, print the list (l2) everytime you remove (pop) an item from it and see where/why it goes wrong.

Please login and solve 5 problems to be able to post at forum