(defun combinations (lst k) (if (= k 0) (list '()) (when lst (let ((first (car lst)) (rest (cdr lst))) (append (mapcar (lambda (x) (cons first x)) (combinations rest (1- k))) (combinations rest k)))))) (defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (k (read)) (a (loop repeat n collect (read))) (res 0)) (dolist (b (combinations a k)) (let ((s (reduce #'+ b))) (when (<= (mod s 998244353) (mod s 998)) (incf res)))) (format t "~d~%" (mod res 998)))) (main)