If it's a simple question, then you should be OK doing it.

You can use this as an exercise in modular arithmetic, if you like that sort of thing. m mod 5 = 3, m mod 3=2, m mod 6 = 4, where mod is basically the remainder. This assumes that "sharing" means distributing whole numbers of mangoes.

At first glance, it seems like this might be contradictory, based on the outcomes for 3 and 6. I.e. numbers that leave 4 when divided by 6 are 4, 10, 16, 22, and so forth. They all leave 1 when divided by 3, so none of them will leave 2 when divided by 3.

If you didn't have that situation, then you would proceed as follows:

You can work this out by saying that m = 5j + 3 and and also m = 3k + 2 and 6n + 4. So then some power algebra and Chinese Remainder theorem machinations allow coming up with the formula for acceptable m's, they will repeat with a cycle of 30. (Here you can see the problem is that m = 3k+2 and also 3(2n + 1) + 1 and so you need an integer that is both one more as well as two more than some multiple of 3.)