Hello all,
I have tested all cases given by different programmers in this thread and my algorithm seems to be correct, even though I am getting wrong answer. Can any one help me by viewing my code, where is flaw in my algorithm:-

Thanx in advance,
Suyash

Last edited by Suyash.Upadhyay on Tue Jun 12, 2007 1:07 pm, edited 1 time in total.

For the input "100 1" your code prints "100 things taken 99 at a time is 100 exactly.". It also seems that it doesn't handle cases where N==M well: for "5 5" it prints "5 things taken 0 at a time is exactly." (note the zero and the space).

The biggest problem with most problems is not how to solve the problem, but how to not solve what is not the problem.

So im stuck at problem 369 - Combinations , first of i tought it was damn easy , but i've run in some problems later I cleared it all out.
The problem is i still get WA , so i searched the forum , and pretty much every test case i tried is correct , i dont think its a problem with the sollution , but with the presentation.
Heres the code:

As my algo seems too slow for 530 ill redo both problems , and previously you stated that i cannot take for sure that m != 0 but in the problem it states that 5<=m<=n therefore i didnt bother , eaven after i changed it it still gives wa , well wouldn't be fun to solve if it was easy , if I get any further problems ill post thank you for the help.
Maths is the way i should consider ^^.

hi...I am new in this section..please someone help me ...I have tried my best but I am getting WA evrytime.here is my code..please kindly help me.one thing my code gives right answer in my compiler I dont know what to now..