Update problem 4

Replaced 'a' with 'x' on line 11 to prevent repetitive calculations.