Implement a function find_divine_digits that calculates the number of divine digits and generates a list of these divine digits based on the provided integer n, divisor k, and a list of integers A.
Functionality Requirements:
The function should take three parameters:
An integer n (representing the number of elements in list A).
An integer k (the divisor).
A list A containing n integers.
The function will calculate the Greatest Common Divisor (GCD) of k and the GCD of all elements in the list A.
The function will then determine how many integers (divine digits) can be generated in the range from 0 to k, stepping by the calculated GCD.
Return a tuple containing:
The number of divine digits.
A list of divine digits.
Input/Output Requirements:
Input:
An integer n (1 <= n <= 1000).
An integer k (1 <= k <= 10000).
A list A of n integers (1 <= A[i] <= 10000).
Output:
A tuple (num_divine_digits, divine_digits):
num_divine_digits: An integer representing the number of divine digits.
divine_digits: A list of integers containing the divine digits in ascending order.
Example:
python
result = find_divine_digits(3, 12, [6, 9, 15])
print(result) # Output should be (4, [0, 3, 6, 9])
Implementation:
The solution must be written in a file called /app/solution.py. Ensure the implementation follows the function signature provided and meets the described requirements.