Can anyone help me with the josephus problem II from cses set

Revision en1, by Pal, 2021-01-29 23:39:08

it is giving TLE in some of test cases

here is link to my code https://cses.fi/paste/3b8de947940f05b018bda3/

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Pal 2021-01-29 23:39:08 172 Initial revision (published)