gpt4 book ai didi

lisp - 子集总和 - lisp

转载 作者:太空宇宙 更新时间:2023-11-03 19:04:31 31 4
gpt4 key购买 nike

<分区>

我正在尝试用 lisp 编写一个子集求和问题。示例:(subsetsum '(1 2 3) 5) = (2 3), (subsetsum '(1 5 3) 2) =

我只能使用函数

(atom x) 
(null x)
(eq x y)
(equal x y)
(numberp x)
(append x y)
(car x)
(cdr x)
(cons x y)
(if x y z)
(cond ... )
(let ((x y) (u v)) z)
(let* ((x y) (u v)) z)
(defun ...)
(quote x) and its short form 'x
(list x1 x2 ...)
(print ...)
(sort L fun)

我能得到任何提示吗?

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com