You are given an mat.
Select exactly one integer from each row of mat. Return the total number of ways to choose these integers such that the greatest common divisor of all the selected integers is equal to
Two choices are considered different if they select an element from a different column in at least one row.
Constraints:
m mat.length
n mat[i].length
mat[i][j]
You are given an mat.
Select exactly one integer from each row of mat. Return the total number of ways to choose these integers such that the greatest common divisor of all the selected integers is equal to
Two choices are considered different if they select an element from a different column in at least one row.
Constraints:
m mat.length
n mat[i].length
mat[i][j]