Small change to problem 47.

Removing unnecessary check. Does not change that much in execution time.