Removed redundant checks in Problem17.py