Search
shortC, 223 bytes AOC*w=" bottles of beer on the wall",i=100;--i;)R"%d%.*s%s, %d%.*s%.8s.\n%s, %d%.*s%s.\n\n",i,i-1?8:7,w,w+8,i,i-1?8:7,w,w+8,i^1?"Take one down and pass it around":"Go to the stor...
shortC, 47 bytes a,b;AOK"%d",&b);b-1;b=b%2?b*3+1:b/2)a++;R"%d",a Try it online! From @ugoren's C answer from CGCC.
Japt, 3 bytes c|H Try it c|H :Implicit input of string c :Map charcodes | : Bitwise OR with H : 32
I've recently started experimenting with hiding some of the sections in a challenge, using an expandable <details> tag. This seems to have some advantages, but I'm interested to hear how peop...
I don't like the partially or fully hidden examples. Those require more work to see the details, instead of just scrolling on. Anyone curious enough about a challenge from the title will want to ...
J, 39 char Solution: (a.{~ a.((6|.8{.1)+.(_8&{.))&.#:"0@i.]) Test example: (a.{~ a.((6|.8{.1)+.(_8&{.))&.#:"0@i.]) '([({Enclosed})])A@B.c' ({({enclosed})})a`b.c How it ...
APL(Dyalog Unicode), 64 bytes SBCS {64-≢∪x,u/⍨∧/¨(>∘0∧<∘9)u←⊃,/(a/⍨2|+/¨|a←,∘.,⍨1 2,-1 2)∘+∘⊂¨x←⍸⍵} Try it on APLgolf! A dfn which takes a boolean grid.
J, 46 char Solution: (]#~[:([:*./(<./,>./)~:"0 1])([:+/"1@#:a.&i.)) Test example: (]#~[:([:*./(<./,>./)~:"0 1])([:+/"1@#:a.&i.)) 'oAPwSoeHcoDretMBBoesoBsagHDoew' Secre...
Raku, 18 bytes {m:g:i/<[aeiou]>/} Implicitly matches the topic variable with the regex Try it online! {m:g:i/<[aeiou]>/} { } : anonymous code block m ...
APL (Dyalog APL), 42 bytes {⎕UCS⊢2⊥1@2⊢(7⍴2)⊤⎕UCS⍵} Attempt This Online! In APL, base encoding(⊤) returns a matrix, so setting the lowercase bit is very easy with 1@2, setting the entire secon...
APL (Dyalog APL), 61 bytes {⍵/⍨~(⊢∊⌊/,⌈/)+⌿0 1↓2⊥⍣¯1⊢0,⎕UCS⍵} Attempt This Online! APL's style of filter works very well here, since we can check for the max and min elements here: (⊢∊⌊/,⌈/) ...
Japt, 13 bytes ÆüÈc¤ñÃé ¤¬øX Try it ÆüÈc¤ñÃé ¤¬øX :Implicit input of string U Æ :Filter each character, X by ü : Group & sort U by È ...
JavaScript, 27 24 bytes Input as a string, output as a character array or empty array. s=>s.split(/[^aeiou]*/i) Try it online! Thanks to Moshi for pointing out the * I was missing that w...
Japt v2.0a0, 3 bytes o\v Try it o\v :Implicit input of string o :Keep only \v :RegEx /[aeiou]/gi
Sclipting, (UTF-16) 22 bytes 놵멡뉖땯더굅낔뭕뇐虛移 Nothing complicated, just replaces the regex [^aeiouAEIOU] with the empty string.
Given an integer $N$ in balanced quinary, output the first $N$ characters of your source code if $N$ is positive, or the last $-N$ characters of your source code if $N$ is negative. Terminology ...
Japt, 233 bytes `ÜÊ Ò Í a×G ¯¯o ÖÚb ¯ØÚ × »Ûá ÝÁ Á²g fig ¤¶n ÓI lªo §Ö ÚAo Ú-n Û u Ûo nÂ) em ÇÓy pe pi¦ Îñ ΰn Ѧk Ѧl sb É Èp Èîp Èl y °ÛG Ù i abiu alÚ app¤ aza bael ba ¼ÚAe ÞÃ...
C (gcc), 41 bytes f(x,y){int r=x*y;return r&&r==x+y?5:x+y;} Attempt This Online!
Recently I asked for tips on improving some code-golf of mine. The code was supposed to output every third value of the Fibonacci sequence starting with 2: 2,8,34,144,610,2584,10946,46368,196418,...
Functions may return bools via the presence/absence of an error Crashing to mean false and not crashing to return true. Another branch of the exit code answer.
Programs/functions may use the presence/absence of output as a bool