java版:http://www.java3z.com/cwbwebhome/article/article5/5936.html?id=1906 C++ 版:http://www.ziyou.math.ncu.edu.tw/~ziyou/c++/practice/code/frog.html