
Problem Description


Problem Analysis
1
Knowledge Points
Input and Output Operations
Variable Definition
Conditional Statements
2
Problem Analysis
Reading Input
Cost Calculation
Comparison Judgement
Read four integers from standard input, representing the number of pens X, the number of notebooks Y, the number of rulers Z, and the amount of money Q that Xiao Ming has.
Based on the given unit prices (pens 2 yuan each, notebooks 5 yuan each, rulers 3 yuan each), calculate the total cost of purchasing all stationery.
Compare the total cost with the amount of money Q that Xiao Ming has. If the total cost is less than or equal to Q, output True, indicating that there is enough money; otherwise, output False, indicating that there is not enough money.
Swipe left to see more

Final Code




WeChat IDδΈ¨yoyolaoshijbc