Company: Netradyne
Difficulty: medium
\\n \\n Digits sum \\n Max. score: 20.00 \\n \\n\\n \\n Given a number N in string format and another number K . Calculate the sum of the digits in N where the index of each digit (with the indexing starting from 0 from left) is a multiple of K . Continue to apply this function recursively until the sum is reduced to a single digit. \\n \\n\\n \\n Function Description \\n Complete the solve() function. The function takes 2 parameters and returns an integer denoting the answer to the question: \\n \\n N : Represents the number in string form \\n K : Represents an integer \\n \\n \\n\\n \\n Input Format for Custom Testing \\n Use this input format if you are testing against custom input or writing code in a language where we don\\\\\\\'t provide boilerplate code. \\n \\n The first line contains T , which represents the number of test cases. \\n For each test case:\\n \\n The first line contains 2 space-separated numbers. \\n \\n \\n \\n \\n\\n \\n Output Format \\n For each test case, pr