If those Length and Width are consecutive integers then we can calculate the answer by following:
let's consider that Length is n
Then width will be n+1
Perimeter of rectangle is equal to 2*(L+W) in this case
P = 2*(n + [n+ 1]) = 2*(n + n + 1) = 2(2n + 1)
P = 318
318 = 2(2n+1)
159 = 2n+1
159 - 1 = 2n
158 = 2n
79 = n
So this means that Length is 79 and Width is 80
or vice versa, Length is 80 and Width is 79