p1011

loop + recursive, but still TLE