#!/usr/bin/guile \
-e main -s
!#
(use-modules ((srfi srfi-1)
#:select (iota remove)))
(define (Func num max)
(let ((base (1+ (* (quotient num 10) 10))))
(length
(remove (lambda (x)
(> (* x (modulo x 10)) max))
(iota 9 base)))))
(define (main args)
(with-exception-handler
(lambda (ex)
(display "wrong number of arguments")
(newline))
(lambda ()
(format #t "N = ~a~%"(apply Func (map string->number (cdr args)))))))
IyEvdXNyL2Jpbi9ndWlsZSBcCi1lIG1haW4gLXMKISMKCih1c2UtbW9kdWxlcyAoKHNyZmkgc3JmaS0xKQogICAgICAgICAgICAgICM6c2VsZWN0IChpb3RhIHJlbW92ZSkpKQoKKGRlZmluZSAoRnVuYyBudW0gbWF4KQogIChsZXQgKChiYXNlICgxKyAoKiAocXVvdGllbnQgbnVtIDEwKSAxMCkpKSkKICAgIChsZW5ndGgKICAgICAocmVtb3ZlIChsYW1iZGEgKHgpCiAgICAgICAgICAgICAgICg+ICgqIHggKG1vZHVsbyB4IDEwKSkgbWF4KSkKICAgICAgICAgICAgIChpb3RhIDkgYmFzZSkpKSkpCgooZGVmaW5lIChtYWluIGFyZ3MpCiAgKHdpdGgtZXhjZXB0aW9uLWhhbmRsZXIKICAgICAgKGxhbWJkYSAoZXgpCiAgICAgICAgKGRpc3BsYXkgIndyb25nIG51bWJlciBvZiBhcmd1bWVudHMiKQogICAgICAgIChuZXdsaW5lKSkKICAgIChsYW1iZGEgKCkKICAgICAgKGZvcm1hdCAjdCAiTiA9IH5hfiUiKGFwcGx5IEZ1bmMgKG1hcCBzdHJpbmctPm51bWJlciAoY2RyIGFyZ3MpKSkpKSkpCg==