HackWithInfy Problems
A multi-story building has several floors. Each floor has an elevator. You are given two integers X and Y. The elevators in the building have a system with the following rules.
Write a program to find the minimum time required to move to a common floor.
Example:
Input:
3
20 16 10
100 120 10
160 180 10
Output:
3 4
3 20
5 20
import java.util.*;
class Innoskrit {
public static void main(String[] args) {
}
}
class Innoskrit:
pass
if __name__ == "__main__":
pass
#include <bits/stdc++.h>
using namespace std;
class Innoskrit {
public:
};
int main() {
}
Output:
© 2022 - All Rights Reserved.