1. The cost of 50 apples is equal to Robert’s full allowance. Thus, the cost of one apple is:
\[
\text{Cost of one apple} = \frac{\text{Allowance}}{50}
\]
Similarly, the cost of one banana is:
\[
\text{Cost of one banana} = \frac{\text{Allowance}}{40}
\]
2. Robert saves 10% of his allowance. Thus, the remaining amount he spends is:
\[
\text{Remaining allowance} = 0.9 \times \text{Allowance}
\]
3. After buying 20 bananas, the money spent on bananas is:
\[
\text{Cost of 20 bananas} = 20 \times \frac{\text{Allowance}}{40} = \frac{\text{Allowance}}{2}
\]
4. The remaining money is:
\[
\text{Remaining money after bananas} = 0.9 \times \text{Allowance} - \frac{\text{Allowance}}{2} = 0.4 \times \text{Allowance}
\]
5. The number of apples Robert can buy with the remaining money is:
\[
\text{Number of apples} = \frac{0.4 \times \text{Allowance}}{\frac{\text{Allowance}}{50}} = 20
\]
Conclusion: Robert can buy 20 apples with the remaining money.