Gaajvi's blog

By Gaajvi, history, 9 years ago, In English

here is problem about binomial coefficients someone can help me?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    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