The prices of different types of bricks are
Black soil brick - ₹ 100
Red soil brick - ₹ 80
To buy maximum number of bricks, Ram has to opt for cheaper bricks.
So the number of red soil bricks Ram can buy would be
=24000 ÷ 80
80) 2400 ( 300
24
_____
00
0
____
00
0
____
0
= 300 bricks