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 41819

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

4 votes
1 answer
230 views

Switch program flow from external pulse

You work for the military as a coder and are responsible for writing software to control missiles. Your task is to write a program or function that will output a code sequence (any length ASCII string …
Voitcus's user avatar
  • 755
24 votes
1 answer
2k views

Solve a traffic intersection

The task Write a program or function that takes a traffic intersection structure and outputs the sequence, in which vehicles will pass. The output should contain at most four lines with the followin …
Voitcus's user avatar
  • 755
2 votes

Mass of elements

PHP, 893 695 bytes function a($e,$m=[H,1,He,4,Li,7,Be,9,B,11,C,12,N,14,O,16,F,19,Ne,20,Na,23,Mg,24,Al,27,Si,28,P,31,S,32,Cl,35,Ar,40,K,39,Ca,40,Sc,45,Ti,48,V,51,Cr,52,Mn,55,Fe,56,Co,59,Ni,59,Cu,64,Zn …
Voitcus's user avatar
  • 755
4 votes

Generate random UUID

PHP, 69 72 75 bytes foreach([8,4,4,4,12]as$c)$r[]=rand(".1e$c","1e$c");echo join('-',$r); This does not output hex digits (a, ... f). They are allowed, but not required by the question body. No di …
Voitcus's user avatar
  • 755
2 votes

Code me a cookie

Commodore 64 BASIC, 181 bytes 10 INPUT A$ 20 IF A$="PLAIN" THEN B$="/ \":C$="| |" 30 IF A$="CHOCOLATE" THEN B$="/. .\":C$="| . |" 40 IF A$="NUTS" THEN C$="/^ \":C$="|^ ^|" 50 PRINT" ___":PRINT B …
Voitcus's user avatar
  • 755
7 votes

Stop, stand there where you are!

Commodore 64 BASIC, 19 16 bytes 1000 FORI=1TO930*N:NEXT:RETURN With a call N=<number-of-secods>:GOSUB1000. However, I cannot provide enough accuracy. Because C64 had about 1 MHz CPU speed, I remem …
Voitcus's user avatar
  • 755
2 votes

Leap for Leap Seconds!

PHP, 198 bytes foreach([.5,1,2,3,4,5,6,7,8,9.5,10.5,11.5,13.5,16,18,19,20.5,21.5,22.5,24,25.5,27,34,37,40.5,43.5] as$d){$h=(int)$d-ceil($d);echo date("Y-m-d 23:59:60",mktime(0,0,0,-6*$h,31+$h,(int)$d …
Voitcus's user avatar
  • 755