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.
same problem
I understand that since so many people have completed this task, it is most likely my fault, but I still do not understand. The error message says that the error is in the tests. I also checked the execution of my code on prints in cases where an error occurs and the code is executed to the end without problems, but the index error still occurs in the test.
PYTHON
Help me please! I don't understand what the problem is. On my computer, the same code with the same input data is executed without errors.
Code:
def rank(st, we, n):
Error:
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.10/site-packages/codewars_test/test_framework.py", line 112, in wrapper
func()
File "/workspace/default/tests.py", line 87, in randomTests
test.assert_equals(rank(st, we, k), rankSol(st, we, k))
File "/workspace/default/tests.py", line 56, in rankSol
res.append([f[i], we[i] * scoreSol(f[i])])
IndexError: list index out of range