Ad
  • Custom User Avatar

    Hey man... Did you check the tests one-by-one?

    According to the example in the instructions, we have to take an input number, and the base of the expansion is the length of that number... Right? And then calculate for each digit of the input number: base^digit.

    But in some tests it fails... For example, when we take the number 12, the base is 2, so we get: 2^1 + 2^2 = 2 + 4 = 6, but the test isnarcissistic(12) returns True instead of False.

  • Custom User Avatar

    I pass all the tests, but... [100000, 3.1415826536] should equal [100001, 3.1416026535]

    Can someone help me?

    I'm using Python.

    When I run the code in the IDLE it works okay,

    (epsilon: 9.99990000099999e-06

    [100001, 3.1416026535])

    and it passes the test above, but running here it failed.

  • Custom User Avatar

    I pass all the tests too, but...
    [100000, 3.1415826536] should equal [100001, 3.1416026535]
    [1000000, 3.1415916536] should equal [1000001, 3.1415936536]
    Can you help me?