Company: Rapido_10oct
Difficulty: medium
Multiple Problem Description Given two boxes of chocolate containing A and B chocolates representing the number of chocolates Alex and Drake have, respectively. Drake is the younger child and will only be happy if he receives a multiple of what Alex gets. You decided to buy some extra chocolates. Mathematically, The share of chocolates will be k * (A + X) = (B - Y) for some non-negative integer X and Y and some positive integer k. What is the minimum number of extra chocolates (X + Y) that you need to buy? Note: The original chocolates (A and B) cannot be transferred among each other. Function description Complete the function solution . The function takes 2 parameters and returns the solution: A: Represents the number of initial chocolates in Alex's box B: Represents the number of initial chocolates in Drake's box Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code The