Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer array nums and an integer k, return the number of subarrays of nums where the greatest common divisor of the subarray's elements is k.
A subarray is a contiguous non-empty sequence of elements within an array.
The greatest common divisor of an array is the largest integer that evenly divides all the array elements.
 
Please complete the following python code precisely:
```python
class Solution:
    def subarrayGCD(self, nums: List[int], k: int) -> int:
```