Objets/Documentation
transport09.py
Je fournis le calcul pour « Réutiliser la table d’un vrai calcul sur les roues ».
Télécharger ↓"""Check a finite wheel proof with explicit facts and independently cost its DAG."""
from collections import Counter
from fractions import Fraction as F
from itertools import permutations,combinations
from math import gcd
import json
def rank(labels,index):
ring=sorted(index,key=labels.__getitem__)
value=0
for step,x in enumerate(index):
j=ring.index(x)
if step:value=value*len(ring)+j
ring=ring[j+1:]+ring[:j]
return value