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.
Wow, this one is the most clever solution I have seen up to date
Nice. For those confused why this works, see my solution: it has some comments to explain it.
As others pointed out, you should set a lower bound for a to avoid unnecessary computations.
It can become faster by changing range as well as make only one rule for if, proof is my solution
Good Coding
This could run much faster if you replace starting point of a by: n/sqrt(2). Easily provable.
This comment is hidden because it contains spoiler information about the solution
Thanks! I completely forgot that you can get the summation of an integer series through a formula!
Total is the sum of all the number between 1 and n!
Yes, it is important to compute Total even if you use another approach to solve the problem as the sum of all the number between a,b (with b > a) will be total(n=b) - total(n=a). It is mainly the solution of a summation of a integer serie.
what does the variable
total
represent and why is it important in the solution?don't forget the spoiler tag (I just added it to your comment)
This comment is hidden because it contains spoiler information about the solution
is_ingerger() is userful.
卧槽
as long as i undersatand the priciple of the "and" "or" . i think i can do this @@
niubility
its second line just ....complex ....
Loading more items...