Skip to main content
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
Results tagged with
Search options not deleted user 39056

Code-golf is a competition to solve a particular problem in the fewest bytes of source code.

0 votes

Output the qwerty keyboard

Bash, 74 bytes Took a different approach than @Cajova_Houba's answer, so I posted it separately. Ended up not being too much shorter because I initially forgot to deal with space-separating the output …
SnoringFrog's user avatar
  • 1,777
0 votes

The Letter A without A

UNBABTIZED, 18 bytes !0,88.(°0,23.:°0 !0,88. put 88 in cell 0 (°0.23. subtract 23 from cell 0 :°0 print cell 0 as character
SnoringFrog's user avatar
  • 1,777
2 votes

Three-Three-Three!

Labyrinth, 12 bytes Program: !!!(!(!(!@@@ Output: 000-1-1-1 The last two @ aren't technically a comment, but they're just as useless. However, it's kind of inevitable since @'s a necessary character …
SnoringFrog's user avatar
  • 1,777
1 vote

Area of the triangle

dc, 52 bytes Assumes the input is in register t as: x1 y1 x2 y2 x3 y3 with x1 at the top of t's stack. 1kLtLtsaLtsbLtdscLtltrlalclbltla-*sd-*se-*leld++2/p 1 2 4 2 3 7stStStStStSt #puts coordinat …
SnoringFrog's user avatar
  • 1,777
3 votes

Output the qwerty keyboard

Ruby, 86 87 83 71 66 puts"qwertyuiop asdfghjkl zxcvbnm ".split($*[0])[1].gsub /./,'\& ' The extra space after m is to prevent the program from crashing if the input is 'm'. Thanks to @manatwork fo …
SnoringFrog's user avatar
  • 1,777
4 votes

The Letter A without A

Whitespace, 15 bytes It's easy to avoid characters with a language that doesn't use any of them! Try it online! . . . The .'s are unneccessary, and are just to make the codeblock …
SnoringFrog's user avatar
  • 1,777
3 votes

Product over a range

dc, 27 bytes Input assumes a is on top of the main stack and b is under it dsar[dsc*lc1-dla<A]sAlAxrp Ungolfed: dsa # duplicate 'a', store a copy in register a r # reverse top two ite …
SnoringFrog's user avatar
  • 1,777
1 vote

Notcalc (Calculate the wrong answer)

Labyrinth, 6 bytes ??+)!@ Try it online! Takes two number inputs, prints their sum + 1.
SnoringFrog's user avatar
  • 1,777
1 vote

Is it a pangram?

Bash 4+, 86 48 bytes Thanks to @Dennis for saving me 38 bytes! Since return codes are what's checked by test/[ for truthy-ness in bash, the return code should be valid truthy/falsy output, right? If n …
SnoringFrog's user avatar
  • 1,777
4 votes

Count up forever

R, 52 Bytes a=gmp::as.bigz(1);repeat{cat(paste(a,""));a=a+1} (Note: gmp is an external library, so you may have to download it for this solution to work)
SnoringFrog's user avatar
  • 1,777
2 votes

Count the bytes of a program

R, 47 bytes a<-commandArgs(TRUE);nchar(a,"c");nchar(a,"b") Input: (~R∊R∘.×R)/R←1↓ιR Output: [1] 17 [2] 27 If printing line numbers alongside output isn't allowable under the "any format" then …
SnoringFrog's user avatar
  • 1,777
0 votes

Code (Mini) Golf

Python, 212 201 188 143 bytes Much of the credit for this iteration of this script goes to @Erwan, who gave me an entirely different approach to try and some tips that saved me 55 bytes in the end. …
SnoringFrog's user avatar
  • 1,777
0 votes

24 and 12 Hour Times

Foo, 163 bytes Pretty brute-force approach; nothing clever here (I tried in a couple spots but it ended up being shorter not to), just wanted to give Foo a shot. Foo automatically prints anything wit …
SnoringFrog's user avatar
  • 1,777