Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Rejecting, because:
n<1 or not an integer
is a typical relic from authoring in a weakly/none typed language like Python or JS. It makes absolutely no sense in a strongly typed language, where input types can't be arbitrary, nor can they accidentally be negative integers whenu32
is chosen. Usingu32
and ignoring the input handling, which is completely tangential to the task anyway, was the correct choice here.Forked and approved, thanks for the review.
Merge conflict
Rust approved.
Approved
cleaned up Python too
No, this works with all the numbers! Just think about it a lot
Added cases for n < 1; Improved solution performance by 30%; Changed types from u32 to i32
Approved. Sorry for 2yr delay. Better late than never :/
Don't see any point in using "math/big", as int64 can hadle all test cases for n <= 600.
Smart, smart! As usual, akar-O!
Very good! I was close to that solution, sadly I could not make it that beautiful :)
Very smart solution! Would be great if someone could explain it mathematically.
Perfect solution!
Approved
Loading more items...