LA+Chpater+4+ex1+김민기

2067 days ago by math2013

Permutation([2,0,1,3,5,10,8,7]).inversions() Permutation([2,0,1,3,5,10,8,7]).number_of_inversions() Permutation([2,0,1,3,5,10,8,7]).is_even() 
       
0
Traceback (click to the left of this block for traceback)
...
ValueError: The elements must be strictly positive integers.
0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_9.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("UGVybXV0YXRpb24oWzIsMCwxLDMsNSwxMCw4LDddKS5pbnZlcnNpb25zKCkKUGVybXV0YXRpb24oWzIsMCwxLDMsNSwxMCw4LDddKS5udW1iZXJfb2ZfaW52ZXJzaW9ucygpClBlcm11dGF0aW9uKFsyLDAsMSwzLDUsMTAsOCw3XSkuaXNfZXZlbigp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpqIxiUr/___code___.py", line 3, in <module>
    Permutation([_sage_const_2 ,_sage_const_0 ,_sage_const_1 ,_sage_const_3 ,_sage_const_5 ,_sage_const_10 ,_sage_const_8 ,_sage_const_7 ]).inversions()
  File "/root/sage-5.8/local/lib/python2.7/site-packages/sage/combinat/permutation.py", line 455, in Permutation
    return Permutation_class(l, check_input = check_input)
  File "/root/sage-5.8/local/lib/python2.7/site-packages/sage/combinat/permutation.py", line 504, in __init__
    raise ValueError("The elements must be strictly positive integers.")
ValueError: The elements must be strictly positive integers.