Activity for giftiâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #286893 | Initial revision | — | over 2 years ago |
Answer | — |
A: Make a frequency table (histogram) Factor, 46 bytes ``` USE: math.statistics IN: h ALIAS: h histogram ``` (more) |
— | over 2 years ago |
Edit | Post #286892 | Initial revision | — | over 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) |
— | over 2 years ago |
Edit | Post #286891 | Initial revision | — | over 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) |
— | over 2 years ago |
Edit | Post #286890 | Initial revision | — | over 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) |
— | over 2 years ago |
Edit | Post #286888 |
Post edited: |
— | over 2 years ago |
Edit | Post #286888 |
Post edited: |
— | over 2 years ago |
Edit | Post #286888 |
Post edited: |
— | over 2 years ago |
Edit | Post #286888 |
Post edited: Factor, 108 bytes |
— | over 2 years ago |
Edit | Post #286888 | Initial revision | — | over 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) |
— | over 2 years ago |