Update euler5.py

added minor optomization