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 |
This challenge involves creating or parsing pictures using text characters as the paint. Typically this uses only 95 printable (from a total of 128) characters defined by the ASCII Standard from 1963.
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
Walk by walls in a room
JavaScript (Node.js), 197 199 205 208 bytes
Gained some bytes by improving solution, but lost some by fixing a bug regarding "bonus case 2"
Gained 8 bytes after analyzing suggestions from ceilingcat …
0
votes
Walk by walls in a room
Java (JDK), 282 283 287 292 bytes
-2 and -1 bytes thanks to ceilingcat !
-7 bytes with some optimizations
Not bad for Java!
The input is a single string, with line breaks at the end of each row. Ea …
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 …
3
votes
Compare Two Fractions With ASCII Art
Java (JDK), 166 172 bytes
-6 bytes thanks to @KevinCruijssen !
Thank you for the challenge, it was very cool!
(a,b,c,d)->{var r="";int i,j=0,p=b,q=d;while(p!=q|p<=b|q<=d)p+=p<q?b:0*(q+=d);for(;j++< …
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 …