Company: Deutsche_Bank
Difficulty: medium
Value of an expression Problem Description Given a sequence of n integers (a1, a2, ..., an). You are asked to perform the following operation and return the obtained result. For a given integer x, calculate the value of expression: min(f(a1, a2, ..., ax), f(a2, a3, ..., ax+1), ..., f(an-x+1, ..., an)) Here, f(ai, ai+1, ..., aj) returns the value of the rightmost number with the highest number of distinct prime factors. In other words, if mi = f(ai, ai+1, ..., ai+x-1), then you are required to find the value of min(mi). Function description Complete the solve function provided in the editor. This function takes the following 3 parameters and returns the answer: x Represents the given integer value n Represents the size of array a a Represents the value in the array 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 first line contains two integers x and n. The seco