 What's up guys, I'm Michael and welcome to my YouTube channel today. We're gonna do another leech code challenge is gonna be called Deviser game Alice and Bob takes turns to playing a game with Alice playing starting first initially There's a number on the chalkboard on each player's turn that no purse that player makes a move consisting of choosing any number between 0 and n and And mod x is equal to 0 then replace the number and on the chalkboard with n minus x Also, if a player cannot make a move They lose a game Return true if and only if Alice wins a game assuming both players play optimally So originally what I did was I just had a Boolean to return equal to true Whoops my bed And I have my index starting at I equals 0 what I did was while the n is greater than 0 I looped through all the numbers between 1 and n and if the value Mod whatever numbers between 1 and n mod n is equal to 0 and mod a equals 0 Then I then I exit out of this loop and then what I'm gonna do is I Check it again. If n mod I is equal to 0 then I subtract I from n then I said to return equal to not to return to Flip it and then otherwise I break in the end I return true. I return to return if it's true or false but if you realize this shitty this this stupid question is that basically if it's an even number choosing any x with zero between 0 and n They basically just checking if it's even to you guys understand why because If it's even and you subtract 2 from it effects is if x is 2 and you mod a equal to 0 If you subtract 2 from it and it's even then you could divide by 2 again And that would be it would be divisible by 2 again so like if I take 8 and 8 is divided by 2 visible by 2 I get 4 right if I subtract 2 from 8 Six six will be divided by 2 again and over and over again. So this number they're actually checking if it's 2 So this is a dumb question Are you actually have to do is? return and mod 2 Is equal to 0? Run the code Hold up. What is going on? I forgot this run the code And it passes Let's submit it again And it passes so basically that that's all you had to do. This is a dumb question They're just checking if it's even because if it's even then you could divide it by 2 again And then you subtract 2 and it's still even if it's odd then and that you can't divide by 2 again The number x they're talking about just about you too. So yeah, this is a dumb question. Hope you guys enjoy this video