Group dealing with a mission array coding challenge


Assume that a group is dealing with a mystery mission and, they have allocated a code of numbers for every individual from that group to ensure the data of each member. Every time they need to concatenate those individuals digits into how often they have requested to do so until that turned into a single-digit code using the recursive method.

In this way, that code will be the upcoming mission code.

The function should return a single-digit after the sum of all digits.
Write a function solve that have the following parameter(s):
1.) a = an integer
2.) b = an integer

Example
Input:
a = 456
b = 4
Output:
The function will return,
6

Explanation
It will be:
=> 456456456456
=> 4+5+6+4+5+6+4+5+6+4+5+6
=> 60
=> 6+0
=> 6

Constraints
• The list of an integer will be greater than 1 and less than 10000.
• The number of times it has to concatenate will be greater than 1 and less than 25.