Блог пользователя karansiwach360

Автор karansiwach360, история, 8 лет назад, По-английски

Hi, Can someone please help me out with this problem which appeared in Ad Infinitum 17 on Hackerrank.

Problem Link: https://www.hackerrank.com/contests/infinitum17/challenges/number-of-m-coprime-arrays

Thanks!

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

»
8 лет назад, # |
Rev. 7   Проголосовать: нравится +8 Проголосовать: не нравится

Consider some prime P in factorization, sequence of powers should not have two consecutive non-zero powers, then you can multiply answers over distinct primes since they are independent. The first part can be done by matrix multiplication. Hint: matrix should have 2x2 size.