You need to sign in or sign up before continuing.×
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.
Wrong test cases. As soon as solution passes all test cases it's considered right.
Not sure about now but at the time this code was written C# language didn't allow to initialize a variable and assign a value to it within single line of code.
You are welcome!
Was going to post exactly same solution but it's a bit worse in performance I guess :)
Right, I ususally make such a stupid things when I'm sleepy :)
I quite missunderstand your question but there are no checks just ariphmetics.
I little missunderstand the kata. Do we need to use exactly
1 - 1/3 + 1/7...
or some other way to get the correct approximation? Bacause usingC#
I can passTest 6
with epsilon equal to1E-7
. I think that's because precision is to small because all other tests work just fine.This comment is hidden because it contains spoiler information about the solution
May I ask you what are you using in your calculations? Pythagorean theorem or integrals? The first one gives me correct answers for example tests but doesn't work further. The second one is too correct as at Wolftam Alpha.
Why is your example test wrong even for
n=1
? I have checked it here. Or have I misunderstood something?Then there is the only way to solve it: change return type from
int[]
tostring
and correctly format it.Even if no solutions in C# where published?
Still not working. You need to change last test from
Result=""
toResult=new int[]{}}
as well.And why did you changed only examples? Please change all test cases.
Have just solved it already. Now it's ok. Maybe some there were server problems.
Okay, I am sorry then.
Loading more items...