Activity for CrSb0001
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #293713 |
Post edited: -56 bytes |
— | 2 months ago |
Edit | Post #293713 | Initial revision | — | 2 months ago |
Answer | — |
A: Give the fool's fibonacci sequence Python 3, 131 75 62 bytes ```python f=lambda n:n>0and 2+3f(n-1)+4f(n-2)+2sum(map(f,range(n-2))) ``` I know, a one-liner is boring. This is because I apparently didn't need a separate function/lambda to compute the sum of something. So there you have it, a 56 69 (nice) byte save in total. :D (more) |
— | 2 months ago |
Edit | Post #293712 | Initial revision | — | 2 months ago |
Answer | — |
A: Ratio limits of fibonacci-like series Python 3, 26 bytes ```python lambda n:(n+(nn+4).5)/2 ``` We can actually just compute this directly, although I could have taken an alternate path considering the fact that, given $Rn$ as the ratio between any two terms in the $n$-fibonacci sequence defined above (where $n\in\mathbb Z$), then... (more) |
— | 2 months ago |
Edit | Post #293689 | Initial revision | — | 3 months ago |
Answer | — |
A: "Hello, World!" [Emmental], 51 bytes ```none #72.#101.#108::..#111:.#44.#32.#87..#114..#100.#33. ``` [Try it online!] Basically what goes on is `#[num]` pushes the ASCII value of `num` onto the top of the stack, `:` duplicates the top of the stack, and `.` prints the top of the stack. Admittedly this i... (more) |
— | 3 months ago |
Edit | Post #293673 | Initial revision | — | 3 months ago |
Answer | — |
A: Tips for golfing in Python Assignment expressions (Python 3.8+) The assignment expression (aka the walrus operator) `:=` was introduced in Python 3.8 as a result of [PEP 572], which can be used inline to assign a variable as part of an expression, like so: ```python >>> (n:=2, n+5) (2, 7) ``` This can be used in a comp... (more) |
— | 3 months ago |
Edit | Post #293669 | Initial revision | — | 3 months ago |
Answer | — |
A: Print the modular multiplicative inverse / virtual fractions [Python 3.8], 44 bytes Uses a modulus of `216 == 48 == 65536`. ```python for i in range(1,98,2):print(pow(i,-1,48)) ``` How it works: ``` for i in # Iterator range(1,98,2): # Odd numbers below 98 ... (more) |
— | 3 months ago |
Edit | Post #293649 |
Post edited: 2 byte save on my current smallest submission, 21 bytes saved from the one that takes input from STDIN. |
— | 3 months ago |
Edit | Post #293649 | Initial revision | — | 3 months ago |
Answer | — |
A: Is it part of the mandelbrot set? Python 3.8, 57 bytes -2 bytes (`2025-04-02`) ```python def m(c): for in range(16):(z:=c)z+c return abs(z)85 84 64 byte program: ``` b=complex(input()) for in range(16):(z:=b)z+b print(abs(z)<2) ``` Should be pretty self explanatory as it's basically the exact same thing as the fu... (more) |
— | 3 months ago |
Edit | Post #293098 |
Post edited: |
— | 6 months ago |
Comment | Post #293001 |
It's been added.
I also have an answer to the question if you want to try cracking that (more) |
— | 6 months ago |
Edit | Post #293001 |
Post edited: |
— | 6 months ago |
Comment | Post #293001 |
That's fair. I'll change it (more) |
— | 6 months ago |
Edit | Post #293098 | Initial revision | — | 6 months ago |
Answer | — |
A: Abstract Rewriting Systems (Cops) Score: 114 ``` ========== =Alphabet= ========== ACDEIOST+ =============== =Source string= =============== ACDEIOST+ =============== =Target string= =============== SE+CODIDACT =============== =Rewrite rules= =============== AC:CA AD:+++ CA:CO CD:DC CS:SE++ CT:ACT ECS:SCE ... (more) |
— | 6 months ago |
Comment | Post #293001 |
No, that would not be the intention.
The intention was to show an example of an impossible puzzle using the example from Wikipedia, originally stated in 1979 along with being first published in 1980.
If you want though I can add another example of impossibility. (more) |
— | 6 months ago |
Comment | Post #293001 |
`x` and `y` are considered here to be placeholder strings, made up of letters in `{M,I,U}`. Also, with these new rewrite rules, we lose the important aspect of the (original) MU puzzle that we are allowed to duplicate any string that comes after an `M`. (more) |
— | 6 months ago |
Comment | Post #293089 |
Oh, okay. That makes sense (more) |
— | 6 months ago |
Edit | Post #293089 |
Post edited: |
— | 6 months ago |
Comment | Post #293089 |
>Most challenges require fine tuning, so I post mine in the Sandbox category to avoid any answers arriving until the wording is free of potential ambiguity.
...what's wrong with not posting it in the sandbox?
>Does this mean that you are permitted to return only one permutation of each quintupl... (more) |
— | 6 months ago |
Comment | Post #293089 |
>Does "multiple arrays" refer to multiple quintuplets?
Why wouldn't it? I'm basically saying "multiple arrays [of distinct quintuplets".
>Does this mean "for each pair of quintuplets, each quintuplet must have at least 2 elements not present in the other", or the stronger "for each quintuplet, ... (more) |
— | 6 months ago |
Edit | Post #293089 | Initial revision | — | 6 months ago |
Question | — |
Find all unique quintuplets in an array that sum to a given target Inspiration: Leetcode's [3Sum] linkLink on CG&CC >### Problem > >Given an array `nums` of `n` (not necessarily distinct) integers, and given a target number `target`, return an array of all of the unique quintuplets `[nums[a],nums[b],nums[c],nums[d],nums[e]]` such that the following conditions a... (more) |
— | 6 months ago |
Edit | Post #293002 |
Post edited: |
— | 7 months ago |
Edit | Post #293001 |
Post edited: |
— | 7 months ago |
Edit | Post #293002 | Initial revision | — | 7 months ago |
Question | — |
Abstract Rewriting Systems (Robbers) This is somewhat of a [proof-golf]-like [cops-and-robbers]. This is the robbers' thread; the cops' thread can be found here. Sections: > Robbers > Determining a winner Robbers The cops will be posting abstract rewriting systems in their thread. Your task is to prove that a given cop's target... (more) |
— | 7 months ago |
Edit | Post #293001 | Initial revision | — | 7 months ago |
Question | — |
Abstract Rewriting Systems (Cops) This is somewhat of a [proof-golf]-like [cops-and-robbers]. This is the cops' thread; the robbers' thread is here Sections: > Cops > Scoring > What is a rewrite rule? > An example > An example of impossibility > Determining the winner Cops Your task is to create an abstract rew... (more) |
— | 7 months ago |
Edit | Post #291377 | Initial revision | — | about 1 year ago |
Question | — |
Tips for golfing in Emmental Also posted here on CodeGolf.SE Brief introduction to Emmental: - Emmental is a self-modifying programming language defined by a meta-circular interpreter. It is a stack based language, but also has a queue. It was created by Chris Pressey in 2007. This is a list of golfing tips for the progra... (more) |
— | about 1 year ago |
- ← Previous
- 1
- 2
- Next →