The equation x^2 - bx - 24 = 0 can be solved using the factor method.
That means -b = M + N, where M and N are the factors of -24.
Then (M,N) can be: (1,-24),(-1,24),(2,-12), ... ,(-4,6)
[(6,-4) is repeated. So as the following ones]
So b can be -23, 23, -10, ... , 2