|
|
back to boardShow all messages Hide all messagesI think when n=1 k must be 0 no it is not 2 it is 0 you were not understand the problem Edited by author 04.04.2009 20:34 Then why does my AC program output 2??? k cannot be 0 because we cannot divide on it. There will be no answer on question "How much heads of cabbage receive each hare?" because even 1=0*1000000+1 is true. The answer is 2 because for 1 we have 1/1=1 but 1/2=0. And for 2 we have 1/2=1/3=0. I'm sorry maby I was not understood the problem K is the minimum integer that [n/k]=[n/(k+1)] if n=1 then output 2 1/2=0 and 1/3=0 |
|
|