Weird Function | CodeChef

how to solve this kind of problem. what kind of knowledge i need to solve this kind of question

refer to:

1 Like

thank you so much really helped