Activity for giftiâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #286893 | Initial revision | — | about 2 years ago |
Answer | — |
A: Make a frequency table (histogram) Factor, 46 bytes ``` USE: math.statistics IN: h ALIAS: h histogram ``` (more) |
— | about 2 years ago |
Edit | Post #286892 | Initial revision | — | about 2 years ago |
Answer | — |
A: Find n Niven Numbers Factor, 147 bytes ``` USING: kernel math math.text.utils sequences ; IN: n : n ( n -- s ) 0 swap [ [ 1 + dup dup 1 digit-groups sum mod 0 > ] loop dup ] replicate nip ; ``` (more) |
— | about 2 years ago |
Edit | Post #286891 | Initial revision | — | about 2 years ago |
Answer | — |
A: Cumulative Counts Factor, 122 bytes ``` USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ; ``` (more) |
— | about 2 years ago |
Edit | Post #286890 | Initial revision | — | about 2 years ago |
Answer | — |
A: Reduce over the range [1..n] Factor, 95 bytes ``` USING: kernel ranges sequences ; IN: r : r ( n q -- n ) [ [1..b] [ ] ] dip map-reduce ; inline ``` (more) |
— | about 2 years ago |
Edit | Post #286888 |
Post edited: |
— | about 2 years ago |
Edit | Post #286888 |
Post edited: |
— | about 2 years ago |
Edit | Post #286888 |
Post edited: |
— | about 2 years ago |
Edit | Post #286888 |
Post edited: Factor, 108 bytes |
— | about 2 years ago |
Edit | Post #286888 | Initial revision | — | about 2 years ago |
Answer | — |
A: Determine whether an integer is square-free Factor, 108 bytes ``` USING: assocs kernel math math.primes.factors ; IN: s : ? ( n -- ? ) group-factors [ nip 2 < ] assoc-all? ; ``` (more) |
— | about 2 years ago |