HBC211321002 Love You Daddy, Love You Baby题解

坐在坟头思考人生 算法基础篇 55 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
A man came home from work late,tired and irritated,to find his 5-year old son waiting for him at the door. “Daddy,may I ask you a question?”the man replied. “Daddy,how much do you make an hour?”pleaded the little boy. “If you must know,I make $20 an hour.” “Oh,” the little boy replied,with his head down.Looking up,he said,“Daddy,may I please borrow $10?”the father grumbled. “Because I didn’t have enough,but now I do,” the little boy replied.“Daddy,I have $20 now.Can I buy an hour of your time?Please come home early tomorrow.I would like to have dinner with you.” This is a touching story but can’t help you to solve this problem. You could only read Input and Output to solve it.

A man came home from work late,tired and irritated,to find his 5-year old son waiting for him at the door. “Daddy,may I ask you a question?” “Yeah sure,what is it?” the man replied. “Daddy,how much do you make an hour?” “That’s none of your business.Why do you ask such a thing?” the man said angrily. “I just want to know.Please tell me,how much do you make an hour?” pleaded the little boy. “If you must know,I make $20 an hour.” “Oh,” the little boy replied,with his head down.Looking up,he said,“Daddy,may I please borrow $10?” The father was furious,“If the only reason you asked that is so you can borrow some money to buy a silly toy or some other nonsense,then you march yourself straight to your room and go to bed.Think about why you are being so selfish.I work hard every day for such childish behavior.” The little boy quietly went to his room and shut the door.The man sat down and started to get even angrier about the little boy’s questions.How dare he ask such questions only to get some money?After about an hour or so,the man had calmed down,and started to think:Maybe there was something he really needed to buy with that $10 and he really didn’t ask for money very often. The man went to the door of the little boy’s room and opened the door. “Are you asleep,son?” He asked. “No daddy,I’m awake,” replied the boy. “I’ve been thinking,maybe I was too hard on you earlier,” said the man,“It’s been a long day and I took out my aggravation on you.Here’s the $10you asked for.” The little boy sat straight up,smiling.“Oh,thank you daddy!” He yelled.Then,reaching under his pillow he pulled out some crumpled up bills.The man,seeing that the boy already had money,started to get angry again.The little boy slowly counted out his money,then looked up at his father. “Why do you want more money if you already have some?” the father grumbled. “Because I didn’t have enough,but now I do,” the little boy replied.“Daddy,I have $20 now.Can I buy an hour of your time?Please come home early tomorrow.I would like to have dinner with you.”        This is a touching story but can’t help you to solve this problem. You could only read Input and Output to solve it.

HBC211321002 Love You Daddy, Love You Baby题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)

标签: HBC211321002 Love You Daddy Love You Baby题解