Help me in solving SMOL problem

TIME LIMIT IS EXCEEDING…PLEASE TELL HOW TO FIX THIS

@season270703sh
You are getting tle because u r looping it to get the result .
But when u see carefully the result is n%k always .
but there is one case when k==0 then print n.