Code Golf Stack Exchange Community Digest

Top new questions this week:

Compute xkcd's Wrong Times Table

The 2020-05-29 xkcd comic showed us the numbers that Randall Munroe feels would be most likely to result from multiplication, other than the correct answers. The table does seem to have some sort of ...

code-golf number arithmetic  
asked by Aaron Rotenberg 42 votes
answered by dingledooper 14 votes

Judge a book by its cover

Overview The cover of a book will be provided in the following ASCII format: ______ | | | | | | | | ------ The input can be in any reasonable format (eg. a list of strings, a nested ...

code-golf  
asked by math junkie 36 votes
answered by Arnauld 16 votes

Your code has an uncanny mirror twin…

Write two programs, each taking a string s and a number n ≥ 0, such that: The first program prints s n times, separated by newlines. The second program prints each character of s n times, with ...

code-golf string source-layout  
asked by darrylyeo 26 votes
answered by yoann 16 votes

Make true and false global!

We all know true and false, but what do speakers around the globe say? +----------------------+------------+------------+ | Language | True | False | ...

code-golf string decision-problem  
asked by Dingus 25 votes
answered by ovs 16 votes

Cut resistance of a list

Background Define a run in a list as a maximal contiguous subsequence of identical values. For example, the list 0 0 0 1 1 0 3 3 3 2 2 has five runs of lengths 3, 2, 1, 3, 2 respectively. (Think ...

code-golf array-manipulation  
asked by Bubbler 21 votes
answered by Jonah 6 votes

Pairs with Sum divisible by 5

You will be given two integers \$M\$ and \$N\$. Find the number of pairs \$(x,y)\$ such that \$1 \le x \le M\$, \$1 \le y \le N\$ and \$(x+y)\mod5 = 0\$. For example, if \$M = 6\$ and \$N = 12\$, ...

code-golf math  
asked by Jubayer Abdullah Joy 19 votes
answered by Arnauld 9 votes

Bubbler numbers

Background My user ID is 78410, or \$1 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0_2\$. One interesting property of this number is that, in binary, it doesn't have three consecutive identical digits, and yet ...

code-golf number decision-problem binary  
asked by Bubbler 17 votes
answered by Surculose Sputum 6 votes

Greatest hits from previous weeks:

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Hold up..... this isn't trolling. Background These days on YouTube, comment sections are littered with such patterns: S St Str Stri Strin String Strin Stri Str St S where String is a mere ...

code-golf string ascii-art  
asked by Arjun 89 votes
answered by Nitrodon 109 votes

Sing Happy Birthday to your favourite programming language

Your favourite programming language has just had a birthday. Be nice and sing it the Happy Birthday song. Of course you should accomplish this by writing a program in that language. The program takes ...

code-golf string kolmogorov-complexity  
asked by David Frank 121 votes
answered by Optimizer 47 votes

How far should I sum?

How far should I sum? The harmonic series is the "infinite sum" of all the fractions of the form \$\frac1n\$ for \$n\$ positive integer. I.e. the harmonic series is $$\frac11 + \frac12 + \frac13 + ...

code-golf math floating-point  
asked by RGS 30 votes
answered by xnor 7 votes

Make me speak L33T

I want to be down with the kids of the 1990's and start speaking this L33T speak of their's. For any given input I would like the resulting L33T speech as an output. I don't want to go to far down ...

code-golf string  
asked by Matt Bartlett 25 votes
answered by Kevin Cruijssen 11 votes

Is it really time?

A time in the format hhMMss is represented by six numbers in the range 0..9 (e.g.100203 for 3 seconds after 2 minutes after 10am (10:02.03), or 155603 for three seconds after 56 minutes after 3pm ...

code-golf string date  
asked by simonalexander2005 29 votes
answered by Λ̸̸ 3 votes

Draw the national flag of Iceland

This year's UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – the Iceland national football team. Let's draw their national flag. ...

code-golf kolmogorov-complexity graphical-output geometry  
asked by insertusernamehere 109 votes
answered by Gábor Fekete 260 votes

Shortest code to produce infinite output

Write the shortest code you can that produces an infinite output. That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code ...

code-golf  
asked by tbodt 126 votes
answered by marinus 217 votes

Can you answer this question?

Solve the Rook's Round Trip in TikZ (LaTeX)

The riddle In yesterday's newspaper, I found a puzzle in which a Rook should start in the lower-left corner of a 12x12 checkerboard and then, during a round trip, visit each field exactly once except ...

code-golf kolmogorov-complexity graphical-output  
asked by Joe85AC 2 votes
You're receiving this message because you subscribed to the Code Golf community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 110 William Street, 28th floor, New York, NY 10038

<3