Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Tau-function/Racket/tau-function.rkt
Normal file
12
Task/Tau-function/Racket/tau-function.rkt
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#lang racket
|
||||
|
||||
(define limit 100)
|
||||
|
||||
(define (divisor-count n)
|
||||
(length (filter (λ (x) (zero? (remainder n x))) (range 1 (add1 n)))))
|
||||
|
||||
(printf "Count of divisors of the integers from 1 to ~a are~n" limit)
|
||||
(for ([n (in-range 1 (add1 limit))])
|
||||
(printf (~a (divisor-count n) #:width 5 #:align 'right))
|
||||
(when (zero? (remainder n 10))
|
||||
(newline)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue