import math
num1 = int(input("Enter a number: "))
num2 = int(input("Enter a number: "))
print(math.gcd(num1, num2))
The gcd() - greatest common divisor function, which is part of the math module works perfectly in this situation.
Answer:
A
Issues can lead reoccuring costomers to not want to come back, resulting in this issue.
Answer:
Portal is the correct answer.
Explanation:
A portal is a website that is a web portal which is not just like the website because the web portal provides different things from an individual access point. It also offers its customers or users a variety of services from an individual and convenient location. That's why the following answer is correct.
Answer:
Explanation:
Algorithm:
a. In each day, you will have to loop through the hotels that come to the hotel after you stayed last night.
b. If a hotel 'h' is found at more than 'd' distance away from last stayed hotel, then the hotel previous of 'h' is chosen to wait for that night. This is the greedy step, and you stay in this hotel.
c. The process for steps a and b is then repeated until we've reached the last hotel xn.
Running time:
Notice that the worst case occurs if each hotel is at a distance of successive multiples of 'd'. The best move is to estimate the distance to each hotel twice the whole computation in the scenario.
Thus, the total running time that could occur in the worst case is O(2n) = O(n). This is said to be linear time.