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
 
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 1y 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 1y ago by WheatWizard‭  ·  last activity 1y ago by isaacg‭

Question code-golf decision-problem
66%
+2 −0
Challenges How many umbrellas to cover the beach?

Python 3.8+, 219 bytes Short version: from itertools import combinations as c def m(w): for k in range(n:=len(w)): for y in c(range(n),k+1): s=[0]*n for x in y: for r in range(...

posted 1y ago by Arpad Horvath‭  ·  edited 1y ago by Arpad Horvath‭

Answer
66%
+4 −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...

3 answers  ·  posted 1y ago by H_H‭  ·  edited 19d ago by hydroxyl-radical‭

Question code-golf math
66%
+2 −0
Challenges How many umbrellas to cover the beach?

Python 3.8, 117 bytes def f(l): r,s,t=0,0,0 while s<len(l):_,s,t,r=[t:=max(t,(s+i+h)*(h>i))for i,h in enumerate(l[s:])],t,0,r+1 return r Try it online! The idea is to find the le...

posted 1y ago by justhalf‭  ·  edited 1y ago by justhalf‭

Answer
66%
+2 −0
Challenges Borromean coprimes

Jelly, 10 bytes ṭŒcg/€ċ1=1 Try it online! A monadic link taking a list of three positive integers and returning 1 if they are Borromean coprimes and 0 if not. TIO link checks all of the test c...

posted 1y ago by NikNakk‭

Answer
66%
+2 −0
Sandbox Fibonascii Squares [FINALIZED]

posted 1y ago by Sylvester‭  ·  edited 1y ago by trichoplax‭

66%
+2 −0
Challenges Substring factor

Does a positive integer have a substring as a factor? Input A positive integer. Output One of 2 distinct values to indicate whether the input has a factor that is a strict substring of it...

3 answers  ·  posted 12mo ago by trichoplax‭  ·  last activity 10mo ago by Shaggy‭

Question code-golf math number string
66%
+2 −0
Challenges Fibonascii Squares

BQN, 29 28 bytes (⍉≍""){⍉⌽𝕩∾˘𝕨⥊˜⋈˜≠𝕩}´⟜⌽'@'+↕ Try it here! Explanation: (⍉≍""){⍉⌽𝕩∾˘𝕨⥊˜⋈˜≠𝕩}´⟜⌽'@'+↕ # a function taking a single argument ⍉≍"" # a 0-by-1 matrix (...

posted 12mo ago by dzaima‭  ·  edited 12mo ago by dzaima‭

Answer
66%
+2 −0
Challenges Fibonascii Squares

BQN, 37 bytes ⍉∘⌽∘∾˜´(⍉{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...

posted 12mo ago by RubenVerg‭  ·  edited 12mo ago by RubenVerg‭

Answer
66%
+2 −0
Meta Short ​​​titles

This is already a category-level setting. An admin can change it to whatever y'all want it to be. I assume this would be for both the sandbox and the challenges category?

posted 12mo ago by Monica Cellio‭

Answer
66%
+2 −0
Challenges Hex ​​​detector

Vyxal, 46 bitsv2, 5.75 (6) bytes ɾ6*1p¦c Try it Online! Bitstring: 0010000001011001000111011010010100001111001000 Link is to test suite. Should execute up to 870 or so. Try it without the ...

posted 12mo ago by lyxal‭  ·  edited 12mo ago by trichoplax‭

Answer
66%
+2 −0
Meta Short ​​​titles

The title of a Codidact question has a minimum length of 15 characters. For a question this is generally fine, as the title will be a summary of the question in the form of a single sentence. Howe...

2 answers  ·  posted 12mo ago by trichoplax‭  ·  last activity 12mo ago by trichoplax‭

Question feature-request discussion
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 1y ago by Arpad Horvath‭  ·  edited 1y 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 1y ago by Arpad Horvath‭  ·  edited 1y ago by trichoplax‭

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 1y ago by CrSb0001‭

Question code-golf tips
66%
+2 −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 1y ago by Arpad Horvath‭

Answer
64%
+7 −3
Challenges Make $2 + 2 = 5$

In this challenge, add 2 integers, but if both the integers are 2, output 5. Shortest code in each language wins! Example ungolfed program in Python 3.x def add(x, y): if x == 2 and y == 2: ...

23 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 7mo ago by arutonee‭

Question code-golf math number
63%
+5 −2
Meta Can we have [popularity-contest]s?

Just curious, but this might help other users, so I'm placing at Meta. A popularity-contest is a non-objective winning criteria challenge that is based on having the highest scored answer of the c...

2 answers  ·  posted 4y ago by General Sebast1an‭  ·  last activity 4d ago by trichoplax‭

Question support discussion
62%
+3 −1
Meta Under which condition is a function that takes arguments other than those specified by the challenge by itself a valid solution to a challenge?

On my challenge Looping Counter there are several entries like this which contains a function which needs to be called with the right parameters to give the correct output. In this particular case,...

1 answer  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Quintec‭

Question discussion rules
62%
+3 −1
Meta Under which condition is a function that takes arguments other than those specified by the challenge by itself a valid solution to a challenge?

What you said a function is a valid solution to a challenge if and only if it can be called with no more than the specified input of the task This sounds reasonable to me. If you want to make...

posted 3y ago by Quintec‭

Answer
60%
+1 −0
Challenges Create a range grid

Python 3, 49 bytes lambda m,n:[[*range(n*_,n*_+n)]for _ in range(m)] Try it online!

posted 3y ago by orthoplex‭

Answer
60%
+1 −0
Challenges Create a range grid

Python 2, 46 bytes lambda m,n:[range(n*_,n*_+n)for _ in range(m)] Try it online!

posted 3y ago by orthoplex‭

Answer
60%
+1 −0
Challenges Create a range grid

C (gcc), 59 bytes i;f(m,n){while(i<m*n){putchar(i%n?32:13);putchar(48+i++);}} Attempt This Online! m is the number of rows. n is the number of columns.

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

Answer
60%
+1 −0
Challenges Create a range grid

BQN (CBQN), 10 bytes Anonymous function that takes m on the left and n on the right. {𝕨‿𝕩⥊↕𝕨×𝕩} ↕𝕨×𝕩 # list of range [0,m*n) 𝕨‿𝕩⥊ # reshape list to m*n Try it here!

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

Answer