Search
APL (Dyalog Unicode), 23 bytes Anonymous tacit prefix function. Reuires 0-based indexing (⎕IO←0) (⊢⍪⍨¯1↓⊢,∘↑-∘⍳∘≢↑¨⊢)⊢,⌽ Try it online! ⌽ reverse the argument ⊢, prepend the argument (…) ...
Credit This challenge is taken with permission from https://www.mysterytwisterc3.org/en/challenges/level-1/beaver-code Description The encryption method is as follows: The plaintext is divided ...
Jelly, 2 1 byte Z Try it online! -1 byte thanks to Razetime! Full program How it works Z - Main link. Takes a list L on the left Z - Transpose Implicitly print, smashing lists togethe...
APL (Dyalog Unicode), 33 bytes {×x←⊃(2⌷⍵)(÷⍨(/⍨)0=|)⍺×1⌷⍵:x∇⍵⋄⍺} Try it online! The first case doesn't work because it gets really big, but the other two do. The input is taken on the left a...
A Juggler sequence is a sequence that begins with a positive integer $a_0$ and each subsequent term is calculated as: $$a_{k+1} = \begin{cases} \left \lfloor a_k ^ \frac 1 2 \right \rfloor, &...
BQN, 17 bytesSBCS {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} Run online! BQN primitives alone can't express unbounded iteration, so this must be a recursive block function. {𝕩∾1𝕊⍟≠⌊𝕩⋆2|𝕩+÷2} # Function 𝕊 taking argu...
Jelly, 7 bytes *Ḃ×½ḞµƬ *Ḃ×½ḞµƬ *Ḃ input ^ (input % 2) ×½ multiply sqrt(input) Ḟ floor µƬ iterate until converged and collect results Try it online!
C (gcc), 34 bytes f(char*s){*s&&f(s+1)^putchar(*s);} Try it online! Alternative: C (gcc), 35 bytes f(s){read(0,&s,1)&&f()^putchar(s);} Try it online! Alternative ...
A rewrite of this SE question with a simpler input format and guidelines. Challenge Deadfish uses a single accumulator, on which all commands are to be performed. It has the following commands: ...
Inspired by this challenge. If anyone has any suggestions for a song title I could use for the challenge title then please leave a comment. Definition We define f(x) for a given integer as the su...
Well... maybe not in combination with a code golf challenge, but more like an artistic challenge with some theme, similar to screenshot of the month? For reference see for example Outdoors photo co...
Cat Quines Quines that simply output the source code due to some sort of implicit I/O, such as 1 in many languages.
In languages without STDIN (eg ///) programs may input through insertion into the source code Also applies to cellular automata, in which the most natural way of taking input is specifying some sp...
Language + libraries count as a separate language In the header of your entry, you should have something like this: C (clang) + <libraries>, <byte count> You do not need to inclu...
Regexes may output via the list of matched strings (capture group 0)
Multiple URL shorteners in a web-based challenge In challenges which require fetching data from the Internet, URL shorteners can be problematic. This is because: shorteners made after the cha...
None of these are applicable at least not for Code Golf challenges. I think this community should "opt out" of reactions unless we can come up with more relevant ones. "Works for me". Answers ...
The task is to create a program which displays a golf score as text. It takes 2 numbers as input, separated by space or new line: The first number is the par of the specific hole. The second nu...
Many programming languages have the concept of keywords, special syntax items that are not just identifiers reserved by some library, but words reserved by the language itself. The challenge is to...
A while ago I wrote an answer in C (gcc) to the FizzBuzz challenge. Now I've found a shorter solution for the same compiler, which however uses a completely different strategy. Now I wonder if I s...
Python 3.7, 231 bytes class C:pass def g(): async def f():return;yield;await[3for()in()];nonlocal f if None: with lambda:3or 7and 8as q:del x elif False:raise else:assert 1is not 5 try:...
dc, 3 unique bytes, 138 bytes This challenge is pretty easy if you aim for just 4 unique bytes. For example, you could push the stack depth repeatedly to get ascending integers, set the precision ...
C, 66 59 bytes -7 bytes thanks to Lundin! In-place string reversal f(char*s){s[1]?f(s+1):0;for(char t=*s;s[1];*++s=t)*s=s[1];} Try it online!
JavaScript (Node.js), 147 bytes f=(a,b='IVXLCDM',g=Math.log10(a)<<1,c=10**(g/2),e=a/c|0,i=b[g+1],j=a=>b[g].repeat(a))=>a?(e<4?j(e):e<6?j(5-e)+i:e<9?i+j(e-5):j(1)+b[g+2])+f(a...