I had the same thought, struggling with f64 precision loss using log, before eventually checking the u64 docs and seeing this.
Ahh this is what I was trying to do. (until I found I could cheat with x.is_power_of_two())
This comment is hidden because it contains spoiler information about the solution
I always forget you can do comprehensions directly in methods like this because despite them turning print into a function, I can't stick comprehensions directly into print(without the [] or w/e).
The arrogance..
I need to read more about arrow functions
Nice Solution! Somehow i forgot modulo existed =(
Loading collection data...
I had the same thought, struggling with f64 precision loss using log, before eventually checking the u64 docs and seeing this.
Ahh this is what I was trying to do. (until I found I could cheat with x.is_power_of_two())
This comment is hidden because it contains spoiler information about the solution
I always forget you can do comprehensions directly in methods like this because despite them turning print into a function, I can't stick comprehensions directly into print(without the [] or w/e).
The arrogance..
This comment is hidden because it contains spoiler information about the solution
I need to read more about arrow functions
Nice Solution! Somehow i forgot modulo existed =(
This comment is hidden because it contains spoiler information about the solution