Company: Ion_17nov
Difficulty: medium
Min Upgradation Time Problem Description Given two servers and the time taken to upgrade each server in seconds, denoted by t1 and t2 respectively, in one second, one server undergoes the upgrade process. The servers receive requests at certain time intervals and pause use upgrades during those seconds. The servers receive requests at multiples of req1 and req2 respectively. Determine the minimum total time (in seconds) required to upgrade both servers. Notes: Only one server undergoes the upgrade process at any given second. There may be durations during which no server is undergoing an upgrade. Examples Example 1: Input: req1 = 2, t1 = 3, req2 = 3, t2 = 7 Output: 7 Explanation: The first server takes 3 seconds to upgrade, and it receives requests on seconds that are multiples of 2. Similarly, the 2nd server upgrades in 1 second and receives requests on seconds that are multiples of 3. The 1st server upgrades in the 1st, 3rd, and 5th seconds, while the 2nd server upgrades in the 2nd,