roc/crates/cli/tests/test-projects/false-interpreter/examples/queens.false
2024-10-09 20:04:36 +02:00

17 lines
402 B
Text

{ queens }
{ solves the problem of placing n queens on a }
{ n*n chessboard without attacking eachother }
{ written in false }
{ by Marcel van Kervinck }
{ e-mail <marcelk@stack.urc.tue.nl> }
{ June 1994 }
[$0=$[1\]?~[0 2O[$0=~][$$_&$7O7O|_1-&[@1O7O|$+2
O7O|2/3O_1-7O&6O1-q;!+@@]?_1-&]#%]?\%\%\%\%]q:
"enter number of queens [0..9] "B^B'0-
0$@$1[1O0>][$+\1-\]#1-\%\q;!." solutions
"
{ that's all }