#171·leetcode

【每日一题】- 2019-09-12 - 药不能停

作者: azl397985856创建于 2019年9月12日更新于 2023年7月26日
标签Daily QuestionLogic

A certain prescription is very strict. You need to take one tablet of A and one tablet of B every day, neither more nor less. This medicine is very expensive, and you don't want to waste any of it. One day, you open the bottle containing tablets A and pour out one tablet into the palm of your hand. Then you open the other bottle, but accidentally pour out two tablets. Now, you have one tablet A and two tablets B in your palm, and you can't tell which is A and which is B. How can you strictly follow the prescription and not waste any of the tablets?

内容来源: azl397985856/leetcode