We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5bfc59 commit a264414Copy full SHA for a264414
src/0201-0300/292 - Nim Game/nim_game.rs
@@ -0,0 +1,10 @@
1
+impl Solution {
2
+ pub fn can_win_nim(n: i32) -> bool {
3
+ // if n is divisible by 4, then the first player will always lose
4
+ if n % 4 == 0 {
5
+ return false;
6
+ }
7
+
8
+ true
9
10
+}
0 commit comments