刚才搜了一下,感觉和杭电OJ的1069题很相似。[Monkey And Banana](http://acm.hdu.edu.cn/showproblem.php?pid=1069)