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.
You've passed the kata and your current code doesn't show that error. Please delete your post or close the issue next time. Take a look at this doc: https://docs.codewars.com/training/troubleshooting
That's strange, I've copied and pasted your current code and it works.
Fixed for Typescript.
Not that one, maybe it's
using System.Linq
the one you missed.All single digits raised to the 1st power are equal to themselves. I don't get what you're doing there in those examples you mentioned.
12 -> 1^1 + 2^2 = 5 which is not 12
45 -> 4^1 + 5^2 = 26 which is not 45
Maybe you're missing some
using
there?The random tests in Python don't cover much and their value isn't random afaik. There is an open issue about that saying there are no random tests, closing this one. Adding a couple more of fixed tests isn't the solution. I guess a much wider range should be checked the question is how.
C: The tests for
Quadruple_Digit_Tests
are the same as theTriple_Digit_Tests
, they have 3 digits instead of 4.Yes it was the problem, you had the same var name in both loops conditions RomperCondicion5 (or 3, can't remember and you've changed your code now), but you had different var names inside, RomperCondicion3 and RomperCondicion5. So, instead of exiting the loop, it was running until it timed out because the changes you made to one var didn't affect the other. Well, that's a good reason to keep your code dry (dry = don't repeat yourself). Read this please: https://docs.codewars.com/training/troubleshooting
Please use spoiler flag next time, your post was visible in the homepage discourse.
You have a typo in your code and it has an infinite loop. Not a kata issue.
I don't know where you see this:
Because that's not what you should do. Not a kata issue.
The current instructions can be read as return the sum of the distances between the first and the last pillar and the width of the pillars (if there is any) in between. Moreover, if you ignore the width of the first and last pillar, it means consider them 0, left, center or right are the same position.
Please print also the step value.
Are you testing it there with that input value?
You're wrong, you're not following all the rules from this kata.
Loading more items...