Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    HI everyone,

    What means k,
    what should i make in this Kata

  • Custom User Avatar
  • Custom User Avatar

    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.

  • Custom User Avatar

    Just solved it.

    The formula might be confused a little bit.

  • Custom User Avatar

    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...

  • Custom User Avatar

    I'm not sure what the question is.

    89 completions

    It's definitely not impossible...

  • Custom User Avatar

    This kata seems impossible. Too invested to ignore it.

  • Custom User Avatar

    Is it too much to ask why 0 => 7 and 1 => 4 ? Sry but the description is too ambiguous for me.

  • Custom User Avatar

    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)

  • Custom User Avatar

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

  • Custom User Avatar

    You should ask on Discord for assistance. Please don't raise a kata "issue" for this.

  • Custom User Avatar

    Need help on the PI value calculation please help me to get through it, I am Coding in java

  • Custom User Avatar

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

  • Custom User Avatar

    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...