Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
python permutations
import itertools r=0 rr=0 for pm in itertools.permutations([1,2,3,4,5,6,7,8]): if (pm[4]!=pm[5]-1):continue if (pm[6]!=pm[7]-1):continue if (pm[6]<5):continue if (pm[0]==8):continue if (pm[3]==1 or pm[4]==1):continue r+=1 if (pm[4]==4): rr+=1 print(r,r-rr)
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Problem: on_off
information of operating system on which your code is run
python bois
single_digit
test
Aufgabe 15
functional python - from hackernoon.com, lean functional python in 10 min
Dungeon
Convert between degrees and radians
pi1
Please log in to post a comment.