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

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

here is problem about binomial coefficients someone can help me?

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

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by Outsider (previous revision, new revision, compare).

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

There is a discussion page on every HackerRank problem. I suggest you to read it first as it gives some useful hints.

»
9 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

you can start by solving a special case of it problem on project euler hint1 : plot pascal's triangle mod p hint2 : fractal/Sierpinski triangle

  • »
    »
    9 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    also there is another solution which doesn't use the geometric interpretation of the problem (how I solved the problem) and it goes as follows :

    `It is possible to show that if p is prime, choose(m, n) is not divisible by p if and only if the addition n + (m-n) when written in base p has no carries.  This means that the number of entries in the mth row of Pascal's triangle that are not divisible by p is equal to the product over all digits d of m written in base p of 1+d.`
    

    quoted from hyperdex on projecteuler