Proud to say that I was able to finally finish this!! Even though my answer is like the least efficient and most verbose one out there but still..Thank you!

Just avoid list and repeated calc of the squares. Both is taking a lot of time. My results in sec:

n = 1.000: 0.0002543900000091 sec
n = 10.000: 0.0019760499999847 sec
n = 100.000: 0.0156731199999967 sec
n = 1.000.000: 0.1389633400000093 sec
n = 10.000.000: 1.4097446399999853 sec

I have been working on this kata 2 days. First algorithm I've made for 10 min and it goes through simple tests, but for big test (n=5 mln) I can't made it faster then 10 sec. I will improve it and I like this task, but I think this kata is harder then 5kyu. Also it would be good to accent in the task on test for really big sequences.

The clarification is with the description. I wasn't sure if, for example, {2^2} is a valid sequence (sum of 1 elements). The min length of the sequence is not specified.

Either way, if min length of valid sequence is 2, then the test cases hold.

Proud to say that I was able to finally finish this!! Even though my answer is like the least efficient and most verbose one out there but still..Thank you!

Is it not better to say explicitly that there is a property called

`WashedCount`

instead of just scheming through it as if its been mentioned before...Thank you for this interesting kata!!

Finally !! Thanks it was fun.

.

This comment is hidden because it contains spoiler information about the solution

This comment is hidden because it contains spoiler information about the solution

That was a good one!

Resolved

You have to discard leading zeros

Just avoid list and repeated calc of the squares. Both is taking a lot of time. My results in sec:

n = 1.000: 0.0002543900000091 sec

n = 10.000: 0.0019760499999847 sec

n = 100.000: 0.0156731199999967 sec

n = 1.000.000: 0.1389633400000093 sec

n = 10.000.000: 1.4097446399999853 sec

I've just found that the last test will take v=10E7...))) on 5 mln I had the best time 9 sec. I am in stuck! it's pretty upsetting me!

I have been working on this kata 2 days. First algorithm I've made for 10 min and it goes through simple tests, but for big test (n=5 mln) I can't made it faster then 10 sec. I will improve it and I like this task, but I think this kata is harder then 5kyu. Also it would be good to accent in the task on test for really big sequences.

Thanks for the response.

The clarification is with the description. I wasn't sure if, for example, {2^2} is a valid sequence (sum of 1 elements). The min length of the sequence is not specified.

Either way, if min length of valid sequence is 2, then the test cases hold.

Cheers.

Please see description and example test cases.

for n = 100, there are only 3 numbers that meet the requirement. They are

`5, 55, 77`

.for n = 1000, there are only 11 numbers.

## Loading more items...