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.
K is the position of the digit of Pi your code should return. It is zero-indexed, if k is 0, then your code should return 3, read the description again. It's all there.
HI everyone,
What means k,
what should i make in this Kata
Me also
Good lord that took me HOURS to work out. A nice easy 7 kyu that won't take long I thought. How wrong I was.
Looks like I ended up with some massively overcomplicated formula compared to others looking at the solutions, but still works. Could have probably reduced it down but I was a bit sick of it by the end.
Just solved it.
The formula might be confused a little bit.
enough suffering... kill the loops... giving up before googling the master formula that im sure is over there... but i really like the challenge. Congrats!
.. btw I reach a solution not good enough for the extreme case in ejecution time...
I'm not sure what the question is.
It's definitely not impossible...
This kata seems impossible. Too invested to ignore it.
Is it too much to ask why 0 => 7 and 1 => 4 ? Sry but the description is too ambiguous for me.
I had to remember the lessons of mathematics and again derive formulas. Of course, you can look for ready-made formulas, but this is not the way of the Jedi)
This comment is hidden because it contains spoiler information about the solution
You should ask on Discord for assistance. Please don't raise a kata "issue" for this.
Need help on the PI value calculation please help me to get through it, I am Coding in java
This comment is hidden because it contains spoiler information about the solution
Benjamin, thank You very much for this suggestion!
If fact, I was playing a while with replacing 'i' with 'j' and didn't commented in the end.
At my desktop this unoptimized code runs fine (8 cores CPU and 32 GB RAM), but in this environmnet it stops after passing medium tests:
Medium tests (3 of 3 Assertions) OK.
But by large tests I've got twice well-known STDERR: Large tests Execution Timed Out (12000 ms).
So maybe instead of two for loops (by i and by j to summarize elementVal = 1 * i + 2 * j + 1 ) should I switch to an generator plus lambda function ...?
Well, its time to open math books or Calculus manual and come back to Mr Euler's elegant solution...
Loading more items...