Your question is Meeting Two Walkers. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Epic's campus wayfinding interface needs to identify where two employees walking toward each other will meet. Given their starting offices and constant walking speeds, calculate the office where they meet.
Person A starts at start_a and walks toward Person B at speed_a offices per minute. Person B starts at start_b and walks toward Person A at speed_b offices per minute. Both begin at the same time and continue walking directly toward each other. The input guarantees that their meeting location is an integer office.
Implement meeting_office(start_a, start_b, speed_a, speed_b).
You should calculate the result mathematically rather than simulating each minute.
def meeting_office(start_a, start_b, speed_a, speed_b):