Activity for CrSb0001
| Type | On... | Excerpt | Status | Date |
|---|---|---|---|---|
| Edit | Post #293713 |
Post edited: -56 bytes |
— | over 1 year ago |
| Edit | Post #293713 | Initial revision | — | over 1 year 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) |
— | over 1 year ago |
| Edit | Post #293712 | Initial revision | — | over 1 year 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$), ... (more) |
— | over 1 year ago |
| Edit | Post #293689 | Initial revision | — | over 1 year 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 th... (more) |
— | over 1 year ago |
| Edit | Post #293673 | Initial revision | — | over 1 year 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 ... (more) |
— | over 1 year ago |
| Edit | Post #293669 | Initial revision | — | over 1 year 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) |
— | over 1 year 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. |
— | over 1 year ago |
| Edit | Post #293649 | Initial revision | — | over 1 year 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 th... (more) |
— | over 1 year ago |
| Edit | Post #293098 |
Post edited: |
— | almost 2 years ago |
| Comment | Post #293001 |
It's been added.
I also have an answer to the question if you want to try cracking that (more) |
— | almost 2 years ago |
| Edit | Post #293001 |
Post edited: |
— | almost 2 years ago |
| Comment | Post #293001 |
That's fair. I'll change it (more) |
— | almost 2 years ago |
| Edit | Post #293098 | Initial revision | — | almost 2 years 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:... (more) |
— | almost 2 years 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) |
— | almost 2 years 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) |
— | almost 2 years ago |
| Comment | Post #293089 |
Oh, okay. That makes sense (more) |
— | almost 2 years ago |
| Edit | Post #293089 |
Post edited: |
— | almost 2 years 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 quin... (more) |
— | almost 2 years 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 quintupl... (more) |
— | almost 2 years ago |
| Edit | Post #293089 | Initial revision | — | almost 2 years 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 conditio... (more) |
— | almost 2 years ago |
| Edit | Post #293002 |
Post edited: |
— | almost 2 years ago |
| Edit | Post #293001 |
Post edited: |
— | almost 2 years ago |
| Edit | Post #293002 | Initial revision | — | almost 2 years 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 ta... (more) |
— | almost 2 years ago |
| Edit | Post #293001 | Initial revision | — | almost 2 years 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... (more) |
— | almost 2 years ago |
| Edit | Post #291377 | Initial revision | — | over 2 years 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 pr... (more) |
— | over 2 years ago |
- ← Previous
- 1
- 2
- Next →
