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.
4
votes
Shortest infinite loop producing no output
Javascript (8 bytes)
for(;;);
Edit courtody of @KritixiLithos
Javascript (10 bytes)
while(1){}
1
vote
1
answer
565
views
Write two single line functions to encode and decode base64 [duplicate]
Write two functions of one line each that can encode and decode base64.
Use any language you want, but if the language can naturally be converted to a single line (e.g. javascript) then any block of …
2
votes
5
answers
481
views
Exact change in fewest bills and coins [duplicate]
Overview
In the US, the common denominations are the penny ($0.01), the nickel ($0.05), the dime ($0.10), the quarter ($0.25), one dollar, two dollars (less common but lets pretend it's common), five …
16
votes
7
answers
962
views
Lazy word problems
Summary
A teacher was told to prepare word problems for the students. She is given a list of equations and told to write them as the corresponding word problem. However, she is very lazy, so she does …
20
votes
11
answers
1k
views
Simple encryption for people on a byte budget
Overview
Your goal is to implement RC4 encryption. RC4 encryption, invented by Ron Rivest (of RSA fame), was designed to be secure, yet simple enough to be implemented from memory by military soldier …
1
vote
Create a checkerboard matrix
Python, 73 63 62 66 bytes
Saved 4 bytes thanks to officialaimm
r=range(input());print[''.join([`(x+y+1)%2`for x in r])for y in r]
7
votes
"As a child, I was told Spiders felt no emotion."
Python 2.7, 414 405 401 bytes
import zlib
print zlib.decompress('fY9BauhADEP3OcXbueUz1j6X6AUEuogP/xeTpCmUGgxK5iFZ5O85xn++a44ZAHPPPEoAcxMPovEbeBFyddLFyRbyi0i6Hpd5HKqTTVTfLmutOmutdTt0zRwzphoVOCETEkGZLr …
39
votes
16
answers
3k
views
Will I tip over?
Overview
Given a 3 line string, figure out if the structure falls to the left, balances, or falls to the right.
Input structure
You can imagine the structure as metal rod with stuff on top, all being …
0
votes
Am I a Fibonacci Number?
Javascript, 89 bytes
function f(n){s=Math.sqrt;c=Math.ceil;x=5*n**2;a=s(x-4);b=s(x+4);return c(a)==a||c(b)==b}
This uses the fact that all fibonacci numbers have the property that 5x^2+4 or 5x^2-4 …