You are not logged in. Please login at to post your questions!


nCr % M where M is non-prime

How to find nCr % M where M is non-prime? Please explain algo in detail.

asked 06 Jun '15, 19:27

utkarsh13's gravatar image

accept rate: 6%

^Clearly the doubt relates to the problem STDYTAB,part of the ongoing contest. Therefore no help will be provided. Figure it out on your own.


answered 06 Jun '15, 20:11

ironmandhruv's gravatar image

accept rate: 20%

Well i know its related to ongoing contest but explaining this still wont reveal the most crucial part of the problem. BTW, I figured it out on my own.

(08 Jun '15, 05:28) utkarsh134★

Then you have achieved the purpose of the problem, which simply was to figure out your problems yourself!

Happy that you did it! :)

(08 Jun '15, 06:58) ironmandhruv4★

I will share my method after the contest is over.

(08 Jun '15, 20:09) utkarsh134★

Discussion of strategies during ongoing contest is against codechef rules. So better stay away from this till contest ends.


answered 06 Jun '15, 20:43

apptica's gravatar image

accept rate: 17%

I do not understand whether one should answer this question or not! Well the guy is making no reference to any of the contest! Can someone be clearer about the rule? @admin


answered 08 Jun '15, 18:12

xlee's gravatar image

accept rate: 0%

PS: This is indirectly related to June Long

(08 Jun '15, 20:08) utkarsh134★

Good that you now found it on our own. That is the character of a good coder. All the best...


answered 09 Jun '15, 11:25

king_of_hacker's gravatar image

accept rate: 7%

I am not able to find the reply button on any of your posts above @ironmandhruv @apptica But I believe that the question should be answered because the point of LONG is to learn! and its not that answering this question gives away the details of the question anyways


answered 09 Jun '15, 14:34

urdarinda's gravatar image

accept rate: 0%

yes, clearly going from "plz explain algo in detail", a lot of learning is taking place. Clearly it is a part of the problem and answering him would have stopped him from finding the answer himself(which is entirely the point of the Long). The part that I find most funny is, you yourself have not solved the problem, yet feel that answering this question will not give away the details of the question.

(10 Jun '15, 02:35) ironmandhruv4★

@urdarinda i also totally agree with you but since codechef has its own rules and regulations which could have an opposite impact on us so i thought helping after contest is more suitable


answered 09 Jun '15, 20:55

apptica's gravatar image

accept rate: 17%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 06 Jun '15, 19:27

question was seen: 1,938 times

last updated: 10 Jun '15, 02:36