updated euler009.c