SP26045 GCDMAT2 - GCD OF MATRIX (hard)
Description
You have given a matrix of size nxm. Every cell of matrix denote gcd of respective indices. For ex-
A 3x2 matrix have entries
gcd(1,1) gcd(1,2) gcd(2,1) gcd(2,2) gcd(3,1) gcd(3,2)You have given queries i1 j1 i2 j2.
You have to find the sum of matrix formed by upper left corner (i1,j1) and lower right corner (i2,j2).
Input Format
N/A
Output Format
N/A