遇到这类题目,最悲催的莫过于找错规律了,找错了规律,那必然就不可能对了
思路代码都是借鉴的此博客上的
http://blog.csdn.net/zhangxiaoxiang123/article/details/48679457