Learn from a vibrant community of students and enthusiasts,
including olympiad champions, researchers, and professionals.

Trapped

There are 5 persons who are trapped in 5 different elevators. There are 49 floors in the building. The 5 persons are respectively on the 17th, 26th, 20th, 19th, 31st floors. The elevator doors open only when all the elevators are between 21st and 25th floor in descending order. There are 2 buttons +8 and -13 that will be activated only when 2 elevators are selected together. The person on the 19th floor decides to take charge and get all of them out.
What is the minimum number of moves in which he can accomplish the target?