http://www.codechef.com/viewsolution/2204397

why its showing run time error???

I do not know why are you making this problem so difficult, solution is straightforward:

```
if (N % 4 == 1)
ALICE wins
else
BOB wins
```

Hope it helps, Best Luck

I cant understand your code… could u plz write the algorithm instead…

can u explain me how BOB is winning when N=7;

accrding to me-

first chance:

bob would take out from N prime number 5…ie…(N-5)so new N is 2.

second chance:

alice would take out 1 and would certainly WIN…

plz help me out…

please see my answer to your other question.

Kindly post your question on the editorial page of the respective problem here: http://discuss.codechef.com/questions/4162/numgame2-editorial