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.6k posts
 
60%
+1 −0
Challenges Single digit Roman numeral

Vyxal, 12 bitsv2, 1.5 or 2 bytes øṘ Try it Online! or Try the entire test suite Bitstring: 000101111100 Very simply a built-in

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

Answer
60%
+1 −0
Meta Default minimum required precision and supported size for inputs

For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author? Lets say the input is a string, how long a string has to be ac...

0 answers  ·  posted 1y ago by H_H‭  ·  edited 4mo ago by trichoplax‭

60%
+1 −0
Challenges Reverse engineer the colors for a layout.

At my job we have to sometimes lay out materials. Materials come in large long rolls and are cut into smaller pieces when being laid out. When we order the rolls we draw up a layout document which...

0 answers  ·  posted 1y ago by WheatWizard‭

Question code-golf
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Dyalog APL, 21 bytes {≢⍸6=(≢∪)¨⍳⍵/6}÷(6∘*) Bruteforce solution :) ⍳⍵/6 n-dimensional array of all possibilities of rolling $n$ dice, each element is a vector of the dice values ≢ count the ...

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

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Thunno 2, 14 bytes 6RẉDæḳ6R⁼;,ḷẸ\ Attempt This Online! Note: brute-force, so times out for $n\ge5$ on ATO, but I have verified it with $n=6$ on my computer. Explanation 6RẉDæḳ6R⁼;,ḷẸ\ # Imp...

posted 1y ago by Thonnu‭

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

Dyalog APL, 19 bytes (with index origin zero) {-/(!∘6×⍵*⍨6÷⍨⊢)⍳7} This isn't bruteforce! The number of cases where all six faces appear are the OEIS sequence A000920. \[ P_n = \frac{\mathsf{...

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

Answer
60%
+1 −0
Challenges Roll n fair dice

Dyalog APL, 2 bytes ?⍴ Dyadic 2-train, takes $n$ as its left argument and $m$ as its right argument The Roll function ? expects an array of maximum bounds and replaces each item with a random ...

posted 1y ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Can you give me half?

[Extended] Dyalog APL, 4 bytes* *10 bytes, 4 unique '÷'÷⍥≢'÷÷' This computes the length of the string '÷' divided by the length of the string '÷÷' Alternate solution (extended only) (6 unique...

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

Answer
60%
+1 −0
Challenges Probability of rolling all 6 dice faces

cQuents*, 10 bytes O920A$/6^$ That * there is because, while this should be a specification-correct program that does the correct computation, the only interpreter available does not implement ...

posted 1y ago by RubenVerg‭

Answer
60%
+1 −0
Challenges Label a hinged tetromino

Dyalog APL, 89 bytes {1∊∘∊¨⍷¨∘⍵¨⍬{0∊⍴⍵:⍺⋄(⍺,⊂A)∇⍵~A←(⌽¨,⊢)(⊖¨,⊢)(⍉¨,⊢)⊣/⍵}(e⍤⍉e←{⍵/⍨×+⌿⍵})¨4 4∘⍴¨,⌿2⊥⍣¯1⍳2*16} Requires IO to be zero. Thanks Adám for -8 bytes! Ungolfed version: { remove...

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

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

x86-32 assembly, 14 bytes Straightforward solution with custom calling convention: inputs in eax and ebx, output in eax. cmp opcode could be smaller if limited to 8-bit integers? 00000000 <add...

posted 1y ago by qwr‭

Answer
60%
+1 −0
Challenges Expected value of highest dice rolled

Dyalog APL, 16 bytes {(+/÷≢)⌈/¨,⍳⍵/6} Explanation: ,⍳⍵/6 generate a list of all the possible sets of rolls ⌈/¨ find the maximum of each +/÷≢ find the average (sum up all values and divide ...

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

Answer
60%
+1 −0
Challenges Reverse an ASCII string

Python, 16 bytes lambda s:s[::-1] Attempt This Online!

posted 1y ago by qwr‭

Answer
60%
+1 −0
60%
+1 −0
Meta What would this community like to see in a Codidact API?

I'd like to post king-of-the-hill contests that read code directly from answers Essentials This is the only feature I would need in order to start posting contests. The answer content for each...

posted 2y ago by trichoplax‭

Answer
60%
+1 −0
Challenges The holeyest base

Ruby, 63 bytes ->n{(2..16).max_by{|x|n.digits(x).sum{45088003.digits(3)[_1]}}} Attempt This Online!

posted 2y ago by steffan153‭

Answer
60%
+1 −0
Challenges The holeyest base

Jelly, 20 bytes ³b‘ị“ḃṘ¤’b3¤S ⁴ḊÇÐṀḢ Try it online!

posted 2y ago by steffan153‭

Answer
60%
+1 −0
Challenges 8 coexisting queens

Vyxal, 9 bytes ×»∇ḂẆ»f꘍§ Try it Online! Uses spaces for empty and asterisks for queen. Add a › at the end to replace spaces with zeros. ×»∇ḂẆ»f꘍§ »∇ḂẆ»f # 13572064 as a list of digits × ...

posted 2y ago by steffan153‭  ·  edited 2y ago by steffan153‭

Answer
60%
+1 −0
Challenges The holeyest base

Vyxal, 19 18 bytes 16Ḣλ»≤ṪḢ»3τ?nτİ∑;∴ Try it Online! The link goes to a program which has every test case. -1 thanks to Steffan Explained (old) 16Ḣλ?$τ»≤ṪḢ»3τ$İ∑;O 16Ḣ # Th...

posted 2y ago by lyxal‭  ·  edited 2y ago by lyxal‭

Answer
60%
+1 −0
Challenges 8 coexisting queens

J, 20 bytes '01'{~#:2^2842 A.i.8 Attempt This Online! Non-tacit program that outputs implicitly in a REPL. Shoutout to Raul (Miller)#5220 in the APL farm discord for thinking of this cool idea...

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

Answer
60%
+1 −0
Meta What would this community like to see in a Codidact API?

I've now posted on Codidact Meta How should a Codidact public API work? I'll still be taking into account any discussion here if you have Code Golf specific thoughts, but for general API discussio...

1 answer  ·  posted 2y ago by trichoplax‭  ·  edited 1y ago by trichoplax‭

Question discussion
60%
+1 −0
Q&A Up to date JavaScript Try-It-Online

Try it online doesn't support the latest JavaScript features such as optional chaining or null coalescence, which are very useful character-saving operators. Is there another site like TIO, but whi...

1 answer  ·  posted 2y ago by Moshi‭  ·  last activity 2y ago by trichoplax‭

Question try-it-online
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Python 3, 325 322 bytes -3 bytes thanks to steffan153‭! from base64 import* n=int.from_bytes(b85decode('8C^#Z9Uor=^}*nk`yLA}A<z=aTm_V+z!I{Y1+v7z89f>WmC>M4TN(sPp`fvySOeqafPpzk0!*=hK2{h9D...

posted 2y ago by Moshi‭  ·  edited 2y ago by Moshi‭

Answer
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Python 3, 326 bytes print("fig gấc abiu açaí bael date lime lulo neem noni pear pili plum rimu sloe sorb yuzu ackee akebi apple araza cacao caqui carob etrog grape guava ilama jagua kokum kubal ...

posted 2y ago by steffan153‭

Answer
60%
+1 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

Vyxal, 244 bytes `↔ė ¹¢ Ṁṙ ṫ₁ λǎ ȧ₴ ¶Ŀ ¯¡ ɾ⟨ ²ǒ aǍ₄ b₴⟩ l℅₆ n꘍ƒ pƛṖ pṁ‹ p⋏µ p⇧Ż r⋏⅛ s⇧⁋ s⋎Ė ≈•꘍₈ ak↳⁼ …⋎꘍⇩ ₴ꜝza Ǎṁ…℅ ǍŀṪṄ •øĊ¯ ∞¨Ċ¯ ∧¡ǎŀ Ǎ§Ċ¯ ⟇⁺Ċ¯ ₃Ẏ꘍⁼ ṙ†ð‛ ṙ†Ṗ₃ ...

posted 2y ago by steffan153‭  ·  edited 2y ago by steffan153‭

Answer