更新时间:2021-12-02 01:23:01
看看:http://www.swi-prolog.org/FAQ/AllOutput.html
简单的解决方法是在给出答案后输入w,即:
The simple solution is to type w after the answer is given, i.e.:
?- n_queens_problem(10,X).
X = [1, 3, 6, 8, 10, 5, 9, 2, 4|...] [write]
X = [1, 3, 6, 8, 10, 5, 9, 2, 4, 7]
按下w"键后,最后会显示[write]",下一行显示完整的解决方案.
After you have pressed the "w"-key "[write]" is displayed at the end and the full solution appears in the next line.