#P237. 练39.2 蜗牛爬树
练39.2 蜗牛爬树
Description
There is a smooth grapevine that is 17 decimeters tall. A snail starts climbing from the bottom, moving up 3 decimeters per minute, but after each minute of climbing, it must rest for one minute, during which it slides down 1 decimeter. How many minutes will it take for the snail to reach the top of the vine?
Input Format
None.
Output Format
Output a single integer representing the number of minutes it takes for the snail to reach the top.
Sample
NoneIt takes 15 minutes