g0201_0300.s0292_nim_game.Solution.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-kotlin Show documentation
Show all versions of leetcode-in-kotlin Show documentation
Kotlin-based LeetCode algorithm problem solutions, regularly updated
package g0201_0300.s0292_nim_game
// #Easy #Math #Game_Theory #Brainteaser #2022_11_06_Time_129_ms_(94.29%)_Space_32.8_MB_(85.71%)
class Solution {
fun canWinNim(n: Int): Boolean {
if (n % 4 == 0) {
return false
}
return true
}
}