Ad
  • Default User Avatar

    I did not see this zero because in the basic test, exactly the same without a zero, thanks :D

  • Default User Avatar

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

  • Default User Avatar

    thanks, I misunderstood the condition

  • Default User Avatar

    As 937 * 113 = 105881 and the largest palindromic number that can be arranged from the digits of result is: 81518

    why answer not 105501?

  • Default User Avatar

    Yes, I already found another algorithm, and the program is 80 times faster, but I still can't pass these tests 😅

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Bigger numbers:
    Time of your function -0.0001659393310546875
    Time of your function -0.00020432472229003906

    Execution Timed Out (12000 ms)

    how it possible?

  • Default User Avatar

    these random tests were created by the devil

  • Default User Avatar
  • Default User Avatar

    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'