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.
floor division with integers is default anyway, isnt it?
This comment is hidden because it contains spoiler information about the solution
Actually
<set>
is an ordered collection: http://www.cplusplus.com/reference/set/set/But indeed, this solution is great! :)
This comment is hidden because it contains spoiler information about the solution
:))
the solution is straight forward, but not optimized to work with big numbers
uses 6k ± 1 optimization, but there is no need for 5k case
Positive aspects:
shows good practices
1- uses modern C++ language (auto) and standard library
2- does not use depricated parts of the language (uses instread of <math.h>)
Negative aspects:
needs a level of C++ understanding that is not seen in absolute beginners (modf and pow are standard library functions but a novice is also able to create the same functionality using basic C++ calculations)