This is a problem from this year´s local Olympiad exam from Catalunya (2022/2023).
I have tried solving this problem without success. The only useful thing I came up with is that it might be solved by inequalities as its intervals are positive integers and not real numbers. I think I must have forgotten some important concepts that I would be grateful if you could tell me which.
I wish you could help me solve this problem. Thank you very much!!