You are viewing a single comment's thread. Return to all comments →
I believe the testcases's result is incorrect.
My solution:
public static string misereNim(List<int> s) { var pileOfOneCount = s.Count(x => x == 1); var pileOfOtherCount = s.Count(x => x > 1); if (pileOfOtherCount == 0) { return pileOfOneCount % 2 == 0 ? "First" : "Second"; } return pileOfOtherCount % 2 == 0 ? "Second" : "First"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Misère Nim
You are viewing a single comment's thread. Return to all comments →
I believe the testcases's result is incorrect.
My solution: