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.
we might still manage to salvage this kata raul ;)
This comment is hidden because it contains spoiler information about the solution
You could suggest a fork. I'll have a look at it. Original author stopped caring about this kata ages ago.
use katex
Definitely an issue. Without sufficiently large values of
n
, a simple for loop will do. However, larger values ofn
will require values ofr
increasingly close to1
to avoid overflow or underflow.IMHO, this kata would work much better with integer-only inputs, with output taken modulo a large prime. This would eliminate all accuracy concerns.
There are no performance constraints, although the description appears to state otherwise. Is this an issue?
I've put my own solution as ref sol for the moment being. You should be able to pass Python now and check if the Python translation has any errors.
even with that fix, in Python I'm not always close enough to ref sol, while I am in JS; anyway, JS and Python updated
fixed description
I believe python ref sol is incorrect. The one in JS seems correct (now).
I updated the formula and the tolerance (js, python), but I think author solution in js and python are not the same. I give up on this kata. Let's tank it.
auhor has given up on this, I vote to retire
This comment is hidden because it contains spoiler information about the solution
What is going on?
Time: 2708ms Passed: 0Failed: 4Exit Code: 1
Test Results:
Fixed_Tests
Basic_Tests
Expected: equal to [8.6667, 6.6667]
Actual: [8.6667, 6.6667]
Random_Tests
Moderate_Values
Expected: equal to [33, 37.3333]
Actual: [33, 37.3333]
High_Values
Expected: equal to [642.333, 895.667]
Actual: [642.333, 895.667]
Huge_Values
Expected: equal to [4697.33, 6422]
Actual: [4697.33, 6422]
To me it does not look to be important info, unless you want to micro-optimise your solution. I do think the max amount of numbers of digs in the input, and max power should be stated in the description.
Loading more items...