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.
I did not see this zero because in the basic test, exactly the same without a zero, thanks :D
This comment is hidden because it contains spoiler information about the solution
thanks, I misunderstood the condition
As 937 * 113 = 105881 and the largest palindromic number that can be arranged from the digits of result is: 81518
why answer not 105501?
Yes, I already found another algorithm, and the program is 80 times faster, but I still can't pass these tests 😅
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Bigger numbers:
Time of your function -0.0001659393310546875
Time of your function -0.00020432472229003906
Execution Timed Out (12000 ms)
how it possible?
these random tests were created by the devil
))
Can anyone help please
Traceback (most recent call last):
File "/workspace/default/.venv/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3621, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 136, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 163, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'e'
The above exception was the direct cause of the following exception:
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 50, in test_case
dotest(s1, s2, expected)
File "/workspace/default/tests.py", line 7, in dotest
actual = scramble(s1, s2)
File "/workspace/default/solution.py", line 18, in scramble
result = [dict_2[i] for i in index if dict_2[i] <= dict_1[i]]
File "/workspace/default/solution.py", line 18, in
result = [dict_2[i] for i in index if dict_2[i] <= dict_1[i]]
File "/workspace/default/.venv/lib/python3.10/site-packages/pandas/core/series.py", line 958, in getitem
return self._get_value(key)
File "/workspace/default/.venv/lib/python3.10/site-packages/pandas/core/series.py", line 1069, in _get_value
loc = self.index.get_loc(label)
File "/workspace/default/.venv/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3623, in get_loc
raise KeyError(key) from err
KeyError: 'e'