fork download
  1. #!/usr/bin/guile \
  2. -e main -s
  3. !#
  4.  
  5. (use-modules ((srfi srfi-1)
  6. #:select (iota remove)))
  7.  
  8. (define (Func num max)
  9. (let ((base (1+ (* (quotient num 10) 10))))
  10. (length
  11. (remove (lambda (x)
  12. (> (* x (modulo x 10)) max))
  13. (iota 9 base)))))
  14.  
  15. (define (main args)
  16. (with-exception-handler
  17. (lambda (ex)
  18. (display "wrong number of arguments")
  19. (newline))
  20. (lambda ()
  21. (format #t "N = ~a~%"(apply Func (map string->number (cdr args)))))))
  22.  
Runtime error #stdin #stdout #stderr 0.01s 5280KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Wrong __data_start/_end pair