We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

# GCD Matrix

# GCD Matrix

#### Sort by

recency

#### |

#### 16 Discussions

#### |

Please Login in order to post a comment

The problem seems to be on the GCD for me. Just building the GCD matrix alone fails efficiency. Do you need to be a GCD expert to solve this? There must be some theorem or something that is required. I can't pass the effiencny tests. How can I make it faster?

python 3: not solve from test 6 bc exceed time.

Here is my solution in java, javascript, python, C, C++, Csharp HackerRank GCD Matrix Problem Solution

Here is GCD matrix problem solution- https://programs.programmingoneonone.com/2021/07/hackerrank-GCD-matrix-problem-solution.htmlIf you know about Mobius function and Inclusive-Exclusive Principle, solving this problem is more comfortable !