Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Search Results

Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 9365
85 results

Kolmogorov complexity, informally, is the amount of code it takes to describe or produce a constant object, such as a string or image. When posting a challenge in this category, please make sure it adds something new to existing challenges.

4 votes

Output a Magical 8 Trapezium

Perl, 49 bytes printf"%9s x 8 + $_ = %s ",$@.=$_,$_+8*$@for 1..9 Usage perl -e 'printf"%9s x 8 + $_ = %s ",$@.=$_,$_+8*$@for 1..9'
7 votes

Deciphering XKCD colors

Perl, 7,375 bytes Stores slightly compressed data (grey -> E, etc) as compressed binary data, expands it into a hash and returns the matching key after replacing spaces in the input with _. I don't t …
4 votes

First they came

Perl 5, 185 bytes print join" they came for ",First,(map"the ${_}s, and I did not speak out- Because I was not a $_. Then",Socialist,"Trade Unionist",Jew),"me-and there was no one left to speak fo …
6 votes

Generate a deck of cards

Perl 5, 41 bytes sub{J,J,map<"$_"{S,D,H,C}>,A,2..10,J,Q,K} Try it online!
1 vote

Alpha-Numerical Bowtie

Perl 5 + -M5.010, 49 bytes say 1..9-abs," "x abs,(a..i)[-9+abs..-1]for-8..8 Try it online!
1 vote

Ascii smiley face challenge

Perl 5 -M5.10.0, 73 bytes $_=unpack"B*","......w......|{.......";y/01/ */,say$_.reverse for/.{13}/g Try it online! Explanation This solution consists of mostly unprintable characters which are a pac …
3 votes

Print a 10 by 10 grid of asterisks

Perl, 17 bytes Requires -E at no extra cost. say"*"x10for 0..9 Usage perl -E 'say"*"x10for 0..9' ********** ********** ********** ********** ********** ********** ********** ********** ********** …
3 votes

Print a 10 by 10 grid of asterisks

Elixir, 35 bytes for _<-0..9,do: IO.puts"**********" Try it online! Originally suggested to @Chester Lynn on their answer.
0 votes

Code Golf Birthday Cake

Perl 5 + -p0513, 119 bytes Pretty much just RLE, nothing too exciting. s''4 6P 4 &11*& 3 P Code GolfP P e9-fP P d11_lP P o13-oP | C15_GP 3#Dennis$Dennis3# 21#';s/\d+(.)/1ドルx$&/ge;s/P/ |/g Try it …
11 votes

Print all alphanumeric characters plus underscore

Perl, 20 bytes Requires -E at no extra cost. say+a.._,A.._,_..9,_ So, my original answer (below) was a bit too boring. The only thing I've managed to come up with is the above, that's exactly the …
1 vote

The alphabet in programming languages

Q is for QuadR, 8 bytes, score: 13 819⌶⎕A⋄⍵ Try it online! Explanation Lowercase (819⌶ - "BIg" without a boolean is un-BIg) the uppercase alphabet (⎕A). The ⋄ avoids any additional output, and the ⍵ …
3 votes

Logo Pack LAPACK

Perl 5, 57 bytes $"=" { ,-}";say+(<"@{[L,A,P,A,C,K]}\n">)[0,21,3,22,12,25] Try it online! Explanation First $" (which is a magic variable that is used as a field separator when lists are interpolate …
0 votes

Make me a blanket!

Perl 5 + -M5.10.0, 97 bytes say s/\d(.)/1ドルx$&/ger x6for('44円/| 24円/ | 4/ | 4/2\ |4/4\|\// 3\|24円 2\|3\ //\\'=~/[^|]+/g)x3 Try it online!
1 vote

Print om sign with pi

Perl + -p, 117 bytes This program contains unprintables so the TIO link is to a Bash program that loads the program from a reversible hex dump. }{s// u0z Q0�1 3.HI9 TlV� o5�U9M� �e3a �f …
3 votes

5 Favorite Letters

Perl 5 -p, 82 bytes (DOCIL) Using the same letters and strategy everyone else is using (reusing the lines where possible), combined with an RLE decoder. }{$_=($;="4D7 3O7 4C5 5I5 L")." D3 D5 O3 O5 C1 …

1
2 3 4 5 6
15 30 50 per page

AltStyle によって変換されたページ (->オリジナル) /