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 |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
0
votes
Calculator that adds char values
><>, 19 bytes
0i:1+?!v+!
;n~<
It does work on Unicode. For example, this correctly outputs 27272
: ⚳ℚ⊻
Try it here
6
votes
Implement a Truth-Machine
AutoHotkey, 20 bytes
I recently got into AutoHotkey and have been waiting for a suitable challenge to try my skills at.
$0::Send 0
1::Send
This takes input by listening for key presses and outputs vi …
3
votes
1
answer
185
views
What's my math assignment? [duplicate]
The Challenge
I always write my math assignments down in the same way. For example:
pg. 420: #25, 50-56, 90
pg. 26: #50-60 evens, 70-80 odds, 90-99 3s
pg. 69: #12, 16, 18, 37
But I need you to tel …
2
votes
"cat"-like program
><>, 7 bytes
I know a ><> solution already exists, but I figured it would be welcome.
i:0(?;o
Click here to try it
1
vote
Find amount of heads and tails from percentages
TI-BASIC, 31 22 24 bytes
Forgot to count new lines before...
Prompt A,B
gcd(2A,2B➡C
Disp 2A/C,2B/C
This was done in the middle of math class...
4
votes
Rapunzel, Rapunzel, let down your hair!
Javascript, 105 97 bytes
Thanks to Oki for helping save 7 bytes!
p=(t,s)=>(s||"o").repeat(t)
l=>h=>(d=l-h,o=d/3-.5|0,l>h?`A${p(d,"a")}h`:`B${p(o-d)}h`+p(-o))+"!"
Defines an anonymous currying func …
12
votes
Simple cat program
><>, 7 bytes
i:0(?;o
Try it here.
Explanation:
i:0(?;o
i Take a character from input, pushing -1 if the input is empty
:0( Check if the input is less than 0, pushing 1 if true, 0 if false …
1
vote
Simple cat program
TI-Basic, 12 10 bytes
While 1
Input Str1
Disp Str1
1
vote
Validate a stem-and-leaf plot
JavaScript, 189 bytes
(x,y=x.split`
`.map(a=>a.split`|`),z=y.map(a=>a[0]))=>!(/[^0-9|\n]|^\|/m.exec(x)||/^\d+\|\n|\|$/.exec(x)||y.some((c,i,a)=>c.length!=2||c[1]!=[...c[1]].sort().join``)||z!=z.sort(( …
5
votes
Connect the pixels
ALPACA, 414 + 2 = 416 bytes
neighbourhoodV(^ v < >);states" ";statep"#"toA when4inV p,toB when3inV p andvs,toC when3inV p and^s,toD when3inV p and>s,toE when3inV p and<s,toF when2inV p and>s andvs,to …
2
votes
Code Golf Golf Golf
TI-Basic, 183 bytes
Input X
Input Y
X+1➡X
ClrHome
For(I,1,10
Output(I,1,"|
Output(I,12,"|
End
Output(2,4,"|>
Output(3,4,"|
Output(4,4,"O
Output(Y,X,"o
13
Output(1,Ans,"TRY AGAIN!
If X=4 and Y=4
Output …
2
votes
Reverse stdin and place on stdout
Brachylog, 1 bytes
(maybe noncompeting?)
↔
Try it online!
3
votes
Pretty Print Polynomials
Wolfram Language/Mathematica, 39 bytes
TraditionalForm@Expand@FromDigits[#,x]&
Try it online!
Turns out there is a built-in to get in in the right order.
Previous solution:
Wolfram Language/Mathemati …
7
votes
Simulate the Wireworld cellular automaton
ALPACA, 82 chars
ALPACA is a language specifically designed for cellular automatons.
o is nothing; c is conductor; e is electron; t is electron tail.
state o " ";
state c "c" to e when 1 e or 2 e;
…
1
vote
Don't google "google"
><>, 108 bytes
i:"g"=1-?v\]
i:"o"=1-?v\
i:"o"=1-?v\
i:"g"=1-?v\
i:"l"=1-?v\
i:"e"=1-?v\
i:01-=1-?v\
>i:0)?v~l n;
^ < <
Try it here