Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Optymalizacja metodą brutal force"""
- 'zmienne'
- n = 3
- A = []
- for a in range (1,n+1):
- for b in range (1,n+1):
- for c in range (1,n+1):
- for d in range (1,n+1):
- for e in range (1,n+1):
- for f in range (1,n+1):
- for g in range (1,n+1):
- for h in range (1,n+1):
- pozycja=(h-1)+n*(g-1)+(n**2)*(f-1)+(n**3)*(e-1)+(n**4)*(d-1)+(n**5)*(c-1)+(n**6)*(b-1)+(n**7)*(a-1)
- A.append(pozycja)
- 'wynik = f(a,b,c,d,e,f,g,h)'
- 'tu coś liczysz'
- '^^^ po matlabowemu: A[pozycja] = wynik'
- print(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement