This can be solved by a simple linear equation and a substitution. Let's assume that n is my number. So as per the equation:
n x n/2 = 162
Which means, n^2 = 162 x 2
Which means, n^2 = 324
Which means, n = √324
Which means, n = -+18
Both 18 and -18 could be my number, since it is not mentioned my number is positive or negative.