Company: Walmart_12march
Difficulty: medium
Number Sequence Analysis Problem Description You are tasked with solving a problem that involves filtering, computing, and finding subsequences based on specific criteria. You are asked to take numbers from 1 to n(exclusive) and find out the numbers which are divisible by 6 or 7 and add their digits to match with an integer k, if matched find the min number to be added so that these numbers become prime and store it as a sequence. You are then supposed to find a subsequence such that its sum is equal to x. If the length of the subsequence is again a prime number, find the middle element in that sequence. Input Format The first line contains an integer n indicating the total number of integers to be considered. The second line contains an integer k indicating the sum of digits to be matched. The third line contains an integer x indicating the target sum for subsequences. Output Format In the first line display a valid subsequence sorted lexicographically. In the second line, display the