设梨有x个,则苹果为4/5x,根据题意得
(1-1/3)x+36=4/5x
2/3x+36=4/5x
4/5x-2/3x=36
x=180
苹果 180×4/5=144
180+144=324(个)
答:苹果和梨一共324个