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 |
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.
2
votes
Zottffssentettffssen
Java (JDK), 92 bytes
Interesting challenge!
()->{var s="ottffssente";for(int i=0;i<90;)s+=++i==9?"":s.charAt(i<9?i:i/10%9);return"z"+s;}
Try it online!
I'm really glad that it was possible to beat …
2
votes
Draw the initial positions of Mölkky pins in ASCII art
JavaScript (Node.js), 279 bytes
Solution without hardcoding, which was kind of a hell to write.
But i needed to be exactly sure how much longer it was than the output itself!
_=>[...Array(128)].map(( …
1
vote
Print this diamond
Java 8 (OpenJDK 8), 157 161 bytes
-4 bytes thanks to @ceilingcat
Tried to use only 1 for instead of 2 for two-dimensional printing, but couldn't beat the best Java answers.
interface M{static void ma …
12
votes
17
answers
3k
views
Draw the initial positions of Mölkky pins in ASCII art
Write a function (or a whole program) that outputs (or prints) an ASCII art of the initial position of Mölkky pins.
Output :
__ __ __
__(07)__(09)__(08)__
(05)__(11)__(12)__(06)
| (03)__(1 …
1
vote
Print this diamond
JavaScript (V8), 77 78 bytes
-1 byte thanks to Donat!
Not the shortest JS solution, but not the longest either!
for(i=9;--i+9;)print(("".padEnd(a=i<0?-i:i)+"1".repeat(9-a)**2).replace(0,1))
Try it …
2
votes
"Print this diamond" gone beautifully wrong
JavaScript (V8), 95 98 bytes
-3 bytes thanks to Donat
I don't know if it's very polite to answer my own challenge, but here it is!
z=9
for(z of(s=(n=1,p="".padEnd(9-z))=>p+(n<z?n+s(n+1)+n:z)+p)())p …
0
votes
ASCII Borromean Rings
JavaScript (Node.js), 114 bytes
Replaced reccuring patterns with their identifiers, which are their indexes in the second string after splitting on the #.
_=>`002
001001
201
101101
131
111111
113
110 …
23
votes
30
answers
4k
views
"Print this diamond" gone beautifully wrong
Write a function (or a whole program) that outputs (or prints) the following ASCII art:
Output:
1
1 2 1
1 2 3 2 1
1 2 3 …
1
vote
A challenge for rookies
JavaScript (Node.js), 105 bytes
_=>[...Array(4607)].map((e,i)=>`.*R
`[++i%72?i%9?((i/9|0)%72<8)+(i%72%10==1):3:4]+(i%576?"":`
`)).join``
Try it online!
How it works:
Using 1-dimensional array and …
2
votes
Recreate the ASCII-table as an ASCII-table
Java (JDK), 192 194 200 bytes
-6 bytes with the help of Khuldraeseth na'Barya
-2 bytes with more refactoring (column separators conditioned instead of concatenated, and - managed by pairs to keep th …