problem 46 solved

a even better solution is to use recursive judge. set the upper and
lower limit for sub-recursion