Activity for RubenVerg
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #292936 |
Post edited: -2 |
— | 13 days ago |
Edit | Post #292936 |
Post edited: explanation |
— | 13 days ago |
Edit | Post #292936 | Initial revision | — | 13 days ago |
Answer | — |
A: Display a Progress Bar Uiua, 19 bytes ``` $"[]"⊏⊙"-|">÷⟜⇡50÷ ``` pad ``` $"[]"⊏⊙"-|">÷⟜⇡50÷... (more) |
— | 13 days ago |
Edit | Post #291909 |
Post edited: -3 and remove explanation |
— | 5 months ago |
Edit | Post #291909 | Initial revision | — | 5 months ago |
Answer | — |
A: Fibonascii Squares BQN, 37 bytes ```bqn ⍉∘⌽∘∾˜´(⍉{1⊸⌈⊸⋈⊑+`∘⌽⍟𝕩↕2}⥊'@'⊸+)¨∘⌽∘↕ ``` -3 thanks to dzaima The output isn't the same as the example but I think it's still correct if I understand the challenge correctly. Result for x = 7: ``` FFFFFFFFEEEEE FFFFFFFFEEEEE FFFFFFFFEEEEE FFFFFFFFEE... (more) |
— | 5 months ago |
Comment | Post #291759 |
Should the first example's input be `6`, since it shows 6 numbers (including 0)? (more) |
— | 5 months ago |
Comment | Post #289925 |
yeah, thanks for pointing it out! as soon as I have time I'll figure out what the challenge asks and what my code does and fix the explanation. (more) |
— | 5 months ago |
Edit | Post #291892 | Initial revision | — | 5 months ago |
Answer | — |
A: Hex detector Dyalog APL, 10 bytes ``` ⊢∊1+\⍤,6×⍳ ``` Port of lyxal's Vyxal answer. Explanation ```apl ⊢∊1+\⍤,6×⍳ ⊢∊ ⍝ is the inpu... (more) |
— | 5 months ago |
Comment | Post #289925 |
@trichoplax hmm, just saw this reply nine months late (: i don't recall what the code is doing but i can see by looking at it that it takes two inputs because `⎕` appears twice. presumably one of the two *n*s is meant to be an *i*. (more) |
— | 5 months ago |
Edit | Post #289925 |
Post edited: wrong description |
— | about 1 year ago |
Edit | Post #289925 |
Post edited: misread challenge |
— | about 1 year ago |
Edit | Post #289925 | Initial revision | — | about 1 year ago |
Answer | — |
A: Digit Sum Integer Sequence (working title) Dyalog APL, 23 bytes ```apl {⍵+(⌈/+⌊/)10⊥⍣¯1⊢⍵}⍣⎕⊢1... (more) |
— | about 1 year ago |
Edit | Post #288899 |
Post edited: -1 unique |
— | over 1 year ago |
Edit | Post #289001 |
Post edited: fix ungolfed |
— | over 1 year ago |
Edit | Post #289001 |
Post edited: -8 bytes (thanks Adám) |
— | over 1 year ago |
Edit | Post #289001 |
Post edited: |
— | over 1 year ago |
Edit | Post #289001 | Initial revision | — | over 1 year ago |
Answer | — |
A: Label a hinged tetromino Dyalog APL, 89 bytes ```apl {1∊∘∊¨⍷¨∘⍵¨⍬{0∊⍴⍵:⍺⋄(⍺,⊂A)∇⍵A←(⌽¨,⊢)(⊖¨,⊢)(⍉¨,⊢)⊣/⍵}(e⍤⍉e←{⍵/⍨×+⌿⍵})¨4 4∘⍴¨,⌿2⊥⍣¯1⍳216} ``` Requires IO to be zero. Thanks Adám for -8 bytes! Ungolfed version: ```apl { removeEmptyRows←{⍵/⍨×+⌿⍵} removeEmptyCols←removeEmptyRows⍉ ⍝ Transpose, then rem... (more) |
— | over 1 year ago |
Comment | Post #288939 |
I just realized this place is two years old and not, like, a few months, but my point still stands (more) |
— | over 1 year ago |
Edit | Post #288944 | Initial revision | — | over 1 year ago |
Answer | — |
A: Probability of rolling all 6 dice faces cQuents, 10 bytes ```text O920A$/6^$ ``` That there is because, while this should be a specification-correct program that does the correct computation, the only interpreter available does not implement importing any OEIS sequence, but just a few. I suppose this might suggest this is not a va... (more) |
— | over 1 year ago |
Comment | Post #288939 |
from a somewhat shallow look, it seems as though this site still has a quite small userbase, I'm sure the answers will come trickling in sooner or later :) (more) |
— | over 1 year ago |
Comment | Post #288939 |
Also, I wonder if there is another nice visualization of the answer like the one I eventually found for the one about the max roll. Might think about that for a bit. (more) |
— | over 1 year ago |
Comment | Post #288939 |
I feel like someone who doesn't read the whole post before voting also won't read comments :) thanks for caring @#53890 tho! gotta say these nice entry-level challenges are refreshing, on cgse there's this "you're answering a 9 years old question" every time I want to do some basic q's. i'm a sucker ... (more) |
— | over 1 year ago |
Edit | Post #288939 |
Post edited: clarify validity of solution |
— | over 1 year ago |
Comment | Post #288939 |
right, might clarify this in my answer (more) |
— | over 1 year ago |
Comment | Post #288939 |
I'd hoped you also had a much more intuitive closed form than mine for this problem :) I guess I kinda cheated by looking it up on the OEIS, though I suppose I could've come up with it with some more days of thought (more) |
— | over 1 year ago |
Edit | Post #288914 |
Post edited: |
— | over 1 year ago |
Edit | Post #288939 |
Post edited: FPE for some inputs |
— | over 1 year ago |
Edit | Post #288939 | Initial revision | — | over 1 year ago |
Answer | — |
A: Probability of rolling all 6 dice faces Dyalog APL, 19 bytes (with index origin zero) ```apl {-/(!∘6×⍵⍨6÷⍨⊢)⍳7} ``` This isn't bruteforce! The number of cases where all six faces appear are the OEIS sequence A000920. \[ Pn = \frac{\mathsf{OEIS}{\text{A000920}}(n)}{6^n} \] which is \[ \frac {6!} {6^n} \left\lbrace {n ... (more) |
— | over 1 year ago |
Edit | Post #288919 |
Post edited: -1 byte |
— | over 1 year ago |
Comment | Post #288914 |
thanks for the feedback, was experimenting with this new style for long visual explanations - I would've generated the tables with APL anyways, might as well put the code in as well :) (more) |
— | over 1 year ago |
Comment | Post #288914 |
@#53890 I've added an explanation for what I visualize my function to be doing (and also realized that, of course, $7 - \left(\frac 6 6\right)^n$ is just $6$ :) ) (more) |
— | over 1 year ago |
Edit | Post #288914 |
Post edited: add explanation, change code slightly |
— | over 1 year ago |
Comment | Post #288914 |
Yep, I read your sol and instantly went "oh this is a generalization of the 2n-1 "shells" for the 6x6 table. Still trying to figure out mine :) and also why the one I had without 7- doesn't give the correct answer (like, I get why it can't work - it's decreasing instead of approaching 6 in the limit,... (more) |
— | over 1 year ago |
Edit | Post #288919 | Initial revision | — | over 1 year ago |
Answer | — |
A: Probability of rolling all 6 dice faces Dyalog APL, 21 bytes ```apl {≢⍸6=(≢∪)¨⍳⍵/6}÷(6∘) ``` Bruteforce solution :) `⍳⍵/6` n-dimensional array of all possibilities of rolling $n$ dice, each element is a vector of the dice values `≢` count the elements `⍸` where it is true that `(≢∪)¨` the length of the unique elements `... (more) |
— | over 1 year ago |
Comment | Post #288914 |
I found it by first writing just the sum, without the 7 - part, realized it was accidentally decreasing in the limit but that the n=1 case was correct, so I just tried to flip it and shift it up and it worked. I'm not really sure how it works - still trying to figure that out :) thanks for working ou... (more) |
— | over 1 year ago |
Edit | Post #288914 | Initial revision | — | over 1 year ago |
Answer | — |
A: Expected value of highest dice rolled Dyalog APL, 14 bytes ```apl {6-+/⍵⍨6÷⍨⍳5} ``` Not bruteforce! An exact implementation of the formula \[ En = 6 - \sum{i=1}^5 \left(\frac i 6\right)^n \] `6-` 6 minus `+/` the sum of `6÷⍨⍳5` the list 1/6, 2/6, 3/6, 4/6, 5/6 `⍵⍨` to the power of the argument of the function Fo... (more) |
— | over 1 year ago |
Edit | Post #288848 |
Post edited: Add test cases for 7, 8 and 9 |
— | over 1 year ago |
Suggested Edit | Post #288848 |
Suggested edit: Add test cases for 7, 8 and 9 (more) |
helpful | over 1 year ago |
Edit | Post #288901 | Initial revision | — | over 1 year ago |
Answer | — |
A: Make $2 + 2 = 5$ Dyalog APL, 9 bytes ```apl +/⊢,2 2≡⊢ ``` Takes the input as a pair `+/` sum reduce `⊢` the input `,` concatenated with `2 2≡⊢` whether the input is equal to the list `2 2` (`1` if true, `0` if false) (more) |
— | over 1 year ago |
Edit | Post #288900 | Initial revision | — | over 1 year ago |