Sort 15 Discussions, By:
Please Login in order to post a comment
python 3: not solve from test 6 bc exceed time.
# Write your code here
appe_list = 
for i in range(r2-r1+1):
for j in range(c2-c1+1):
Here is GCD matrix problem solution - https://programs.programmingoneonone.com/2021/07/hackerrank-GCD-matrix-problem-solution.html
If you know about Mobius function and Inclusive-Exclusive Principle, solving this problem is more comfortable !
You can refer following resource for more on GCD.