Ad
  • Custom User Avatar

    keep getting "unknown error" or memory error from large number input
    f(83065750, 36664444)
    83065750.0 36664444.0
    Traceback:
    in
    in f
    MemoryError

  • Custom User Avatar

    It seems either one of the test case isn't correct or I don't understand the problem
    ['s', 'e', 'w', 'n', 'n', 'e', 's', 'w']
    True should equal False <---- this is the error message I got

  • Custom User Avatar

    I passed all tests, but it gave me error messege listed below. It doesn't seem to be from a new test, since I print out input at the start of the program, and I don't see any new input printing out after the last "Test Passed"
    The las test I passed was "{[{}[]{}{}{}{}{}{}()()()()()()()()]{{{[[[((()))]]]}}}}(())[[]]{{}}[][][][][][]"

    Traceback:
    in
    in group_check
    IndexError: list index out of range

  • Custom User Avatar

    I like the problem,it's cool. I think my code works, tested it with upto 100k in my pc
    but, everytime I submitted, "Process was terminated. It took longer than 6000ms to complete"
    compute-intensive problem such as finding fib number or prime, if you put up too large a number for the test, the server may not be able to handle it within a reasonable time frame.

  • Custom User Avatar

    I tested

    1. n >0
    2. modsys not empty
    3. n is not divisible by any x for all elements x of modsys
    4. n > m1m2m3...*mk
    5. all elements in modsys are co-prime
      but still failed a test for getting a 0 in the result chain

    In the test case, I got
    259 [8, 7, 5, 3]--> 'Not applicable' should equal '-3--0--4--1-'
    15 [8, 6, 5] -->'-7--3--0-' should equal 'Not applicable' (changed my code in here to allow 0 in the chain)
    notice here, 259 % 7=0 and 15 % 5=0, looks contradictory to me
    Is there any specific rule that's not in the problem description?

  • Custom User Avatar

    wouldn't ask if I could understand clearly what the question is asking, both 2 and 3 are prime factor of 12, and 3 and 5 of 15, but why put 3 with 27? simply because 3 is the prime factor of 27, which happens to be the sum of both? why not also put 3 in along with other two values, is it simply because 3 is the prime factor all 3 numbers have in common. what if I have 2 prime numbers that are factors of the sum of all initial values, do I put them with them sum? or there should only be one number with the sum? all those are not clear to me.
    Having just one or two set of result data , it's offen not easy to tell what needs to be done.

    just like your example,I = [15, 30, -45] 5 divides 15, 30 and (-45) so 5 appears in the result, the sum of the numbers for which 5 is a factor is 0 so we have [5, 0] in the result amongst others. obviously, 3 is a prime factor of all 3 numbers as 5, why it's not [3,5,0]? besides, 3 and 5 are not prime factors of 0.

  • Custom User Avatar

    'apples, pears \xc2\xa7 and bananas\ngrapes\navocado' should equal 'apples, pears\ngrapes\navocado'
    \xc2\xa7 is "§"
    I run it in my pc, with python 2.7, and got the result as required, but couldn't pass the test here, maybe a server side issue?

  • Custom User Avatar

    I tried a few different alogrithm,the methods includ direct calculation with loop from f2 to fn, using Binet's formula, using the matrix form, the fib(2n)s,fib(3n)s, all failed at Verifying that fib(-96) == -51680708854858323072, the answers from running here is different from what I get my pc, which gave correct value. must be something wrong on the server side

  • Custom User Avatar

    same issue here,hmm, my code passed all other testes, but it failed in Traceback, as you did, but nowhere in my code use map() function, list(),set(),yield are all I used

  • Custom User Avatar

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