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.
Any discrete math course covers sequences. This one in particular is an arithmetic sequence.
I suggest to study discrete math as it often helps to find O(1) solutions to different problems like combinatorics, sequences etc.
I tried this the first time and it didn't work. shouted the old man shaking fist at cloud
nice and clear what your list interpration is doing.
This comment is hidden because it contains spoiler information about the solution
What branch of math is number progresion taught in? Can anyone recomend some good resources?
need to clean this up
I like one liners but how did You get there I drew the triangle then calulated the values? to arrive the the same solution.
first I tried looking at the indexes in a list, went no where.
You're confusing the input of one test with the error message of another, the log appears above the test result, and the test with that input expects True.
This comment is hidden because it contains spoiler information about the solution
I tried your method first and found out that you just can't use operator as dict values. What you may want to consider is use operator.add instead of
+
. Of course you need to import operator first.This solution is neat, but would take ages to work out the answer if n was very large. Instead you could just use simple maths to calculate the answer rather than count it.
Why would this be a poor solution for n large?
This comment is hidden because it contains spoiler information about the solution
2293ms
If n were large, this would be a very poor solution.
how long did your code take to run? I used a while loop and it was 2500ms
Loading more items...