Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
 
71%
+3 −0
Challenges Find good coalitions

As you might know, there were elections in Germany, and now the parties have to form a government coalition. Let's help them with it! A good coalition has the strict majority of seats (that is, mo...

2 answers  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Moshi‭

Question code-golf
71%
+3 −0
Challenges Find good coalitions

Haskell, 141 bytes import Control.Monad f a=map(map fst)$filter(\c->let{g=map snd;e=sum(g a)`div`2;f=g c;d=sum f}in d>e&&all((<=e).(d-))f)$filterM(pure[1<0..])a Try it ...

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
Challenges Run-length encode a byte sequence

Run-length encoding is a simple compression technique which compresses sequences of repeating identical bytes. The encoding rules for this task are as follows: Any sequence of $n$ identical bytes...

2 answers  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Moshi‭

Question code-golf encoding
71%
+3 −0
Challenges Operation "Find The Operator"

Python 3, 106 91 bytes Saved 15 bytes thanks to Moshi in the comments lambda a,b,c:[p for p in"+ - * // % **".split()if(p in'+-**'or b)and eval(f"{a}{p}{b}")==c] Try it online!

posted 3y ago by celtschk‭  ·  edited 3y ago by celtschk‭

Answer
71%
+3 −0
Q&A Tips for golfing in Java

Use higher versions of Java Seriously, it's crazy what sort of features have been added since Java 8. I hardly recognize the language anymore... Examples: Constructing Lists Before, you had to ...

posted 3y ago by Quintec‭

Answer
71%
+3 −0
Sandbox Golf golf challenge [FINALIZED]

posted 3y ago by Lundin‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Challenges Find the IP address class

Vyxal, 24 bytes \.€hEb:L8-0wẋf$J0ḟkA5Ẏ$i Try it Online! This is absolutely abysmal but whatever. A lot of bytes are taken up by trying to pad the list with zeroes (ẋ was buggy or something so ...

posted 3y ago by user‭  ·  edited 3y ago by user‭

Answer
71%
+3 −0
Sandbox Keyword golfing [FINALIZED]

posted 3y ago by Lundin‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Challenges Find the IP address class

Python 3, 56 bytes lambda x:chr(65+f'{int(float(x[:3]))&~8:08b}'.find('0')) Try it online! Takes in the ip address as a string and returns the classification letter. Explanation: x[:...

posted 3y ago by dino‭  ·  edited 3y ago by dino‭

Answer
71%
+3 −0
71%
+3 −0
Challenges Determine whether an integer is square-free

Scala, 41 bytes x=>2 to x forall(d=>x%d+math.sqrt(d)%1>0) Try it online! Pretty straightforward

posted 3y ago by user‭

Answer
71%
+3 −0
Challenges Determine whether an integer is square-free

Python3, 39 bytes lambda n:all(n%i**2for i in range(2,n)) Try it online! Makes a list comprehension from the numbers 2 through n of the remainder of the square, and then checks whether the lis...

posted 3y ago by dino‭  ·  edited 3y ago by dino‭

Answer
71%
+3 −0
Challenges Determine whether an integer is square-free

Vyxal, 4 bytes K∆²a Try it Online! Outputs 0 for square-free, 1 for not. K # Factors ∆² # Is perfect square a # Any true?

posted 3y ago by emanresu A‭

Answer
71%
+3 −0
Challenges Make $2 + 2 = 5$

Ruby, 20 bytes ->a,b{4[a]*4[b]+a+b} Attempt This Online!

posted 3y ago by radarek‭

Answer
71%
+3 −0
Challenges Can you give me half?

Python 3, 7 distinct characters, 11 bytes True/-~True Try it online!

posted 3y ago by m90‭

Answer
71%
+3 −0
Challenges Can you give me half?

J, 4 3 distinct, 6 bytes -:_-:_ Half of _ -: _ which is asks if infinity matches infinity. Thanks to @xash in the APL farm discord for saving the 3 unique bytes and orthoplex for catching my bl...

posted 3y ago by south‭  ·  edited 3y ago by south‭

Answer
71%
+3 −0
Challenges Can you give me half?

Perl, 3 distinct, 12 bytes s//yy//y/y// Try it online! Prepends yy to the start of $_, and then transliterates them, dividing the count of each.

posted 3y ago by primo-ppcg‭  ·  edited 3y ago by primo-ppcg‭

Answer
71%
+3 −0
Challenges Can you give me half?

Clojure - 15 characters total, 5 unique Inspired by the Embed ESCR solution above, I realized I could do something very similar in Clojure: (/(*)(+(*)(*))) This returns 1/2, which is a Ratio i...

posted 3y ago by BobJarvis‭

Answer
71%
+3 −0
Challenges Can you give me half?

Python 3, 5 unique bytes, 28 total (()==())/((()==())+(()==())) (, ), =, /, + Uses (()==()) to get True with only 3 unique characters, as well as making the later grouping of (...+...) free. ...

posted 3y ago by Moshi‭

Answer
71%
+3 −0
Sandbox Looping counter [FINALIZED]

posted 3y ago by celtschk‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Challenges Looping counter

Ruby, 18 bytes loop{$><<$/=?*+$/} Try it online!

posted 3y ago by orthoplex‭

Answer
71%
+3 −0
Sandbox Create a range grid

posted 3y ago by Razetime‭

Article code-golf matrix
71%
+3 −0
Challenges From the smallest seed

Challenge It's a bootstrapping challenge this time! Write a full program that, once run, writes the source code of another program that in turn, once run, writes the source code for another progra...

2 answers  ·  posted 3y ago by Moshi‭  ·  last activity 3y ago by orthoplex‭

Question code-golf code-generation
71%
+3 −0
Challenges Make a frequency table (histogram)

Challenge Given an array in any suitable format, create a frequency table for it. i.e: Pair each unique element with the number of times it appears in the array. You can return the frequency tabl...

10 answers  ·  posted 3y ago by Razetime‭  ·  last activity 2y ago by Moshi‭

Question code-golf math
71%
+3 −0
Challenges Find n Niven Numbers

Vyxal, 4 bytes ‡∑Ḋȯ Try it Online! Explained ‡∑Ḋȯ ‡ ȯ # Find the first input numbers where: ∑ # The sum Ḋ # Divides that number

posted 2y ago by lyxal‭

Answer