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
1.5k posts
 
60%
+1 −0
Challenges Round trip stones

Python, 104 bytes f=lambda n:"1.0000000.7272730.7285710.7368420.7437890.7491640.7533440.7566570.7593360.761542"[8*n-8:8*n] Try it online! Not too clever. I am curious whether it can be beaten ...

posted 3d ago by Arpad Horvath‭

Answer
66%
+2 −0
Q&A 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 ...

0 answers  ·  posted 8d ago by CrSb0001‭

Question code-golf tips
60%
+1 −0
Challenges The 50 substrings that validate any string of Roman numerals

Haskell, 271 bytes import Data.Char import Data.List n=" IVXLCDM" r x=maximum[if(s`isInfixOf`x)then s else"A"|s<-words$concat$map(\x->(n!!div x 8):[(n!!(x-8*(div x 8)))])$map(\x->ord...

posted 18d ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges The 50 substrings that validate any string of Roman numerals

Python, 220 bytes Works with Python 3.8 or newer. n=" IVXLCDM" x=("".join([n[(d:=ord(c)-32)//8]+n[d-8*(d//8)]for c in'&PW!H.!@/$HF$@G"H6"@7"03#P?%N%O%U%]%^%_&N&O!*!+!1!=!9!<!:!;...

posted 19d ago by Arpad Horvath‭  ·  edited 16d ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges Construct the Irish possessive

Python 3.8+, 577 bytes (was 634 than 591 bytes before) V="eéiíaáoóuúEÉIÍAÁOÓUÚ" r={"mé":("mo",0),"tú":("do",0),"sí":("a",1),"sé":("a",0),"muid":("ár",2),"sibh":("bhur",2),"siad":("a",2)} s=la...

posted 24d ago by Arpad Horvath‭  ·  edited 21d ago by Arpad Horvath‭

Answer
66%
+2 −0
Challenges Round trip stones

$N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection from the first vessel to the secon...

1 answer  ·  posted 27d ago by trichoplax‭  ·  last activity 3d ago by Arpad Horvath‭

50%
+0 −0
Sandbox Round trip stones [FINALIZED]

posted 28d ago by trichoplax‭  ·  edited 27d ago by trichoplax‭

66%
+2 −0
Challenges Construct the Irish possessive

In this challenge you will take an Irish word and a personal pronoun and create the possessive pronoun construction combining the two. For example sé, madra becomes a mhadra. Translated to English...

1 answer  ·  posted 1mo ago by WheatWizard‭  ·  last activity 21d ago by Arpad Horvath‭

66%
+2 −0
Challenges The 50 substrings that validate any string of Roman numerals

Python (344 bytes) 534 bytes: This is not golfed in any way. But it's the current winner! def validate_roman_numeral(candidate): invalid_strings = ["CCCC", "CCD", "CCM", "CDC", "CMC", "CMD"...

posted 2mo ago by daviewales‭  ·  edited 2mo ago by daviewales‭

Answer
50%
+0 −0
Challenges Word suggesting

Charcoal, 88 bytes ≔⪪η λFLθ«¿¬⁼θ⁰«≔…θ⁺ι¹π¿№λπ«≔πω§≔λ⌕λω⁰»«¿Σ⭆λ⁼…κ⁺ι¹π«≔§Φλ⁼…κ⁺ι¹π⁰ω§≔λ⌕λω⁰»«θ≔⁰θ»»»»¿¬⁼θ⁰«ω Try it online!

posted 2mo ago by ok12d‭

Answer
75%
+4 −0
Challenges The 50 substrings that validate any string of Roman numerals

Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves this, from the list of 50 strings described below. Relevant fact This chal...

3 answers  ·  posted 2mo ago by trichoplax‭  ·  last activity 16d ago by Arpad Horvath‭

66%
+2 −0
Challenges 12-hour time is weird

Your mission for today, should you choose to accept it, is to write a simple 12-hour clock calculator. Your input will always be in the form of arg op arg, where op is either + or -, and arg is eit...

0 answers  ·  posted 2mo ago by honnza‭

Question code-golf
71%
+3 −0
Sandbox 12-hour time is weird [finalized]

posted 2mo ago by honnza‭  ·  edited 2mo ago by honnza‭

60%
+1 −0
Challenges Fibonacci without consecutive digits

Python 3, 149 bytes g=lambda r:r>1and g(r-1)+g(r-2)or r lambda n:[i for(i)in map(g,range(2*n+2))if(lambda*l:all(abs(n-i)!=1for(n,i)in zip(l,l[1:])))(*map(int,str(i)))][n] Try it online! ...

posted 2mo ago by ok12d‭  ·  edited 2mo ago by ok12d‭

Answer
60%
+1 −0
Meta Leaderboard sorting bug

The leaderboard that shows below a code golf challenge can either sort the answers to show the winner for each language separately (if "Group by language" is ticked) or it can show all the answers ...

0 answers  ·  posted 2mo ago by trichoplax‭

Question bug leaderboard
66%
+2 −0
Challenges Make $2 + 2 = 5$

Pyth, 6 bytes +!-Q2s Try it online! I think there might be a way to shave a byte, but I can't find it. s Sum the input + Add -Q2 Remove the twos from the input ! Nega...

posted 2mo ago by isaacg‭

Answer
60%
+1 −0
Challenges Is it stuck in a counting loop?

Pyth, 8 bytes qu/Red._ Try it online! A list is in a loop if and only if it is the first list seen twice as f is applied repeatedly. qu/Red._ u Apply the following function, ...

posted 2mo ago by isaacg‭

Answer
60%
+1 −0
Challenges Can I follow this recipe?

Pyth, 15 bytes !f.A-VtTsM._T.p Try it online! Outputs True if no valid recipe exists, False if one does. If truthy/falsy outputs are allowed, the ! can be removed, to just output all valid per...

posted 2mo ago by isaacg‭

Answer
66%
+2 −0
Challenges Can I follow this recipe?

You work in a kitchen which has a peculiar rule. When you mix something into a pot you must always add at least one new ingredient. So you can add pasta, oil, salt then pesto, but not pasta, pesto...

1 answer  ·  posted 2mo ago by WheatWizard‭  ·  last activity 2mo ago by isaacg‭

66%
+2 −0
Challenges Print the modular multiplicative inverse / virtual fractions

Pyth, 16 bytes .^RtJ^2yTyJ%2S97 Try it online! This solution uses Euler's formula, which states that if a is coprime to m, a^(phi(m)-1) = a^-1 mod m where phi(m) is the totient function, t...

posted 2mo ago by isaacg‭

Answer
60%
+1 −0
Challenges Fibonacci without consecutive digits

Pyth, 25 23 bytes @f-1aM.:jT;2u+Gs>2GyQU2 Try it online! First, we generate the Fibonacci numbers: u+Gs>2GyQU2 U2 range(2), the list [0, 1] u Apply the follow...

posted 2mo ago by isaacg‭  ·  edited 2mo ago by isaacg‭

Answer
57%
+2 −1
Challenges Fibonacci without consecutive digits

Output the Nth number in the list of Fibonacci numbers that have no consecutive digits. Input A non-negative integer. Output The Nth number in the list of Fibonacci numbers whose base 10 ...

2 answers  ·  posted 3mo ago by trichoplax‭  ·  last activity 2mo ago by ok12d‭

50%
+0 −0
62%
+3 −1
Challenges Print the modular multiplicative inverse / virtual fractions

Goal Print the modular multiplicative inverse with a modulus of 65536 (or a higher exponent of 2) for odd numbers 1-97. Example output Print these values (or an extension of them): 1 43691 52...

1 answer  ·  posted 3mo ago by H_H‭  ·  last activity 2mo ago by isaacg‭

Question code-golf math