Search
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 ...
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...
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...
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(...
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...
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...
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...
BQN, 29 28 bytes (⍉≍""){⍉⌽𝕩∾˘𝕨⥊˜⋈˜≠𝕩}´⟜⌽'@'+↕ Try it here! Explanation: (⍉≍""){⍉⌽𝕩∾˘𝕨⥊˜⋈˜≠𝕩}´⟜⌽'@'+↕ # a function taking a single argument ⍉≍"" # a 0-by-1 matrix (...
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...
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?
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 ...
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...
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...
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!<!:!;...
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 ...
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 ...
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...
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,...
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...
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: ...
JavaScript (V8), 185 bytes for(c=99;c;)print((f=(s=` on the wall`)=>`${c||99} bottle${~-c?`s`:``} of beer`+s)()+`, ${f``}. ${--c?`Take one down and pass it around`:`Go to the store and buy s...
Scala, 25 bytes a=>_.flatMap(a map _.min) Try it in Scastie! Pretty trivial solution, but here's a bad explanation anyway: //a is the first string a =>_.flatMap(a map _.min) //b is th...
Sclipting, (UTF-16) 80 bytes 갰減먩놔 먩놦①復먩놗겮꺕똀 먩놬①復①增疊먩놣겮꺕똀會먩놣겮꺕떠 먩놩⑴復먩놝 Explanation Input n pushed on stack 갰減 Subtract 3 먩놔 "╔" 먩놦 "╦" ①復 String of above repeat...