from fractions import Fraction as F n=7 sc=[200,200,100,200,180,190,210] PP=[(1,2),(1,3),(2,3),(2,4),(3,4),(4,5),(5,6),(6,7)] b=[[0]*8 for _ in range(8)] b[1][2]=260