The first type: Xiao Ming only borrowed 980 yuan, and spent 970+ 10 on himself to buy shoes = 980 yuan.
The second kind Xiao Ming borrowed 1000, bought 970+ shoes and gave them back to his parents 20+ himself 10= 1000.
Your algorithm is wrong.
Tips for learning mathematics
1, you should be good at thinking when learning mathematics, and the answers you come up with are far more impressive than those others say.
2. Prepare well before class, so that we can better digest and absorb the unknown knowledge points in math class.
3, the mathematical formula must be memorized, and it must be deduced and can be deduced.
4. The most basic thing to learn mathematics well is to master the knowledge points of textbooks and exercises after class.
5. 80% of the scores in mathematics come from the basic knowledge, and 20% of the scores are difficult, so it is not difficult to test 120.