onIn order to solve this, we have to add the number of floors the elevator goes up and subtract the number of floors the elevator goes down, like this:
Initially, it goes down 9 floors since it was at the 10th floor we get:
10 - 9 = 1
Then, after it goes down 9 floors it gets to the first floor, then it goes up 19 floors , now we get:
1 + 19 = 20
After it goes up to the 19th floor from the fits one, it gets to the 20th floor, then it goes down 3 floors, now we get:
20 - 3 = 17
After it goes down 3 floors it gets to the 17th floor, then it goes 12 floors down from the 17th floor:
17 - 12 = 15
At the end, the elevator ends up in the 15th floor