a customer buys some apples, mangos and oranges which total comes exactly 100 fruits

the cost of one apple is 5 Rs.

the cost of one mango is 2 Rs.

and four oranges cost 1 Rupee.

the total amount he pays also equal to 100 Rs.

then how many apples, mango and oranges did he buy?

how these kinds of problems solved mathematically?