Sort by

recency

|

1872 Discussions

|

  • + 0 comments

    This task is made for Python 2. Python 3 generates a different hash value that fails tests.

  • + 0 comments

    use python2 and paste the below code it will run successfully

    if __name__ == '__main__':
        n = int(raw_input().strip())
        integer_list = map(int, raw_input().split())
    
        print(hash(tuple(integer_list)))
    
  • + 0 comments

    if name == 'main': n = int(raw_input()) integer_list = map(int, raw_input().split()) t = tuple(integer_list) # convert list to tuple print hash(t)

  • + 0 comments

    hash returns differnt kinds of values in python 2 and python 3. Python 3 changed hash to always be random.

    Uses python 2 and raw_input for this one.

  • + 2 comments

    I faced error in solving problem in python3, due to negative values. But you solve the problem in the python 2 the same code will work. Try it