**Question: **There were N stations on a railroad. After adding X stations 46 additional tickets have to be printed. Find N and X.

**Answer:**

Let before adding X stations, total number of tickets

t = N(N-1)

After adding X stations total number of tickets are

t + 46 = (N+X)(N+X-1)

Subtracting 1st from 2nd

46 = (N+X)(N+X-1) - N(N-1)

46 = N2 + NX - N + NX + X2 - X - N2 + N

46 = 2NX + X2 - X

46 = (2N - 1)X + X2

X2 + (2N - 1)X - 46 = 0

Now there are only two possible factors of 46. They are (46,1) and (23,2)

Case I: (46,1)

2N - 1 = 45

2N = 46

N = 23

And X = 1

Case II: (23,2)

2N - 1 = 21

2N = 22

N = 11

And X = 2

Hence, there are 2 possible answers.