#1**-1 **

I bet many people are falling for this:

sqrt(x^2) does not necessarily equal x.

I repeat, sqrt(x^2) does NOT Necessasrliy equal x.

What if x is negative? :)

We'll have to take 2 cases:

1. x >= 0;

This gives us sqrt(120 - x) is an integer.

This means that 120-x is a perfect square. Since x is nonnegative, the amount of values of x is the amount of perfect squares less than 120.

This ranges from 1^2.... to 10^2.. Therefore there are 10 values where x is nonnegative.

2. x < 0

This gives us that sqrt(120 + x) is an integer. However, note that x is negative and there will be the same values of x before because x in our first case is like -x in our case here. Hence, there are 10 values where x is negative.

Adding up these two cases, gives us 20 values.

Voldemort Jul 9, 2022