Hot answers tagged

91 votes
Accepted

How much time is remaining?

Excel, 6 Bytes =B1-A1 Assuming A is in cell A1 and B is in cell B1
user avatar
  • 11.6k
78 votes

Sleep for 1000 years

C (gcc), 40 36 32 29 26 24 bytes i;f(){--i&&f(sleep(7));} Try it online! -3 thanks to @gastropner. -1 recursive approach thanks to @AZTECCO. ...
user avatar
  • 6,777
59 votes

Increment The Time

Microsoft Excel, 9 bytes =A1+"0:1" Input is in cell A1. Tested on my Mac (Excel for Mac version 16.53) and online at ...
user avatar
54 votes

Output the Current Time

Minecraft 1.8.7, 7 + 8 = 15 blytes (bytes + blocks) Only one command block involved: xp 1 @p Output goes to the client console like so: As part of the normal output. This is the system: ...
user avatar
54 votes

Encode the date in Christmas Eve format

SmileBASIC, 73 71 67 bytes ?"Christmas"; @L?" Eve"*(D!=P); P=D DTREAD OUT,M,D IF M/D-.48GOTO@L The program prints "Christmas", then ...
user avatar
  • 6,460
42 votes

I'm too cold, turn up the temperature

Minecraft 1.9.0+, 204 162 bytes + 58 36 28 24 20 blocks = 262 240 232 186 182 blytes This solution is golfed down, and it can't be seen whole in one, or even two screenshots. Uses two glitches and ...
user avatar
  • 863
42 votes

100 Day Countdown

Excel, 10 =NOW()+100 Demonstration
user avatar
41 votes

Sort the months of the year

Jelly, 19 bytes 11ị“bMAanlseovc”iµÞ This is a monadic link that takes a list as argument and sorts it. Try it online! Background Jelly uses modular, 1-based ...
user avatar
  • 206k
41 votes

I'm too cold, turn up the temperature

Bash + linux utilities, 19 seq 40 2 72|pv -qlL2 seq generates the numerical output. pv ...
user avatar
41 votes

Type the Alphabet - as fast as you can!

HTML (JavaScript (ES6)), 129 126 117 bytes ...
user avatar
  • 142k
40 votes
Accepted

When is Thanksgiving?

TI-BASIC, 15 bytes * 0.75 = 11.25 Tested on my TI-84+ calculator 1129-dayOfWk(Ans+ᴇ4,9,1 Thankgiving is November 29, minus the day of the week of September 1st, ...
user avatar
  • 21.2k
40 votes

Setting the time

HTML on Google Chrome 67 in Chinese (Simplified), 39 bytes <input type=time value=00:00 autofocus> Chrome show different UI component in different ...
user avatar
  • 28.6k
40 votes

Sleep for 1000 years

Python 3 (Excluding CPython on Windows), 28 bytes import time time.sleep(3e10) Try it online! (Remember to put something in your will so future generations can ...
user avatar
  • 17.8k
37 votes
Accepted

Stop, stand there where you are!

x86_64 machine code, 10 bytes Hexdump of the code: 48 69 c9 ca fc 59 38 e2 fe c3 Source code (can be assembled by ml64 of ...
user avatar
  • 12k
37 votes

Type the Alphabet - as fast as you can!

6502 machine code (C64 PAL), 189 165 bytes ...
user avatar
  • 4,146
36 votes

How many days in a month?

JavaScript (ES6),  48 47 44 43  42 bytes m=>31^'311'[parseInt(m[1]+m[2],34)*3%49%8] Demo ...
user avatar
  • 165k
35 votes

Leap for Leap Seconds!

R, 78 75 bytes Built-ins, you say? Well... message(paste(as.Date(.leap.seconds)-1,"23:59:60\n"),"2015-06-30 23:59:60") R has an automatic variable ...
user avatar
  • 24.2k
34 votes
Accepted

Shortest expression for {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}

2 2.2 I love arbitrary precision arithmetic. 0x4126030156610>>(n<<2) Or, if you don't like hex, ...
user avatar
  • 41.3k
32 votes

Shortest expression for {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}

2.0 (127004 >> i) ^ 60233 or (score 2.2) : (i * 3246) ^ 130159 All found with brute force :-)
user avatar
  • 8,373
31 votes

Advance Happy New Year, 2016!

Mathematica, 45 37 27 24 bytes #+5[6,6,11][[#~Mod~4]]& Improvements thanks to @MartinBüttner (10 bytes), and @ChipHurst (a further 3 bytes).
user avatar
  • 1,345
29 votes

Implement a Simple Stopwatch

Operation Flashpoint scripting language,  174  171 bytes ...
user avatar
  • 16.2k
28 votes

Automate Saving the World

MUMPS - 30 characters, circa 1966 (ANSI standard first in 1977) My first attempt at code golf, here we go! f w "4 8 15 16 23 42" h 6420 MUMPS is still a ...
user avatar
27 votes

Legen… wait for it…

JavaScript (ES6), 74 bytes You may want to change your system clock before testing, congratulations if you landed here at 59 minutes past. ...
user avatar
  • 2,534
27 votes

Who was president of the USA?

PHP, 936 bytes ...
user avatar
  • 5,887
26 votes

Convert YYYYMM to MMMYY

Python 3, 70 bytes from time import* lambda s:strftime("%b%y",strptime(s,"%Y%m")).upper() This uses the built-in strftime and ...
user avatar
  • 2,192
26 votes

We had a question once which only failed on Sundays

Bash + coreutils, 15 14 bytes `date|grep Su` Try it online!
user avatar
  • 206k
26 votes
Accepted

Days in indexed month

APL (Dyalog Unicode), 13 12 bytesSBCS Anonymous tacit prefix function. 0-indexed. February is 29. 31-1∘=+2|7∘| Try it online! ...
user avatar
  • 27.1k
26 votes

Sleep for 1000 years

bash, 26 24 bytes I think part of the challenge here is to not have a signed 32 bit overflow, so: ping -i86400 -c365243 t.co The idea here is to make 1000 years of ...
user avatar
  • 651
25 votes
Accepted

Leap for Leap Seconds!

CJam, 72 70 69 64 bytes 26,"~g¼K&Béx¸¦­Ø"240bFbf{<1b2md\1972+'-@6X$4*-'-Z3$" 23:59:60"N} Try it online in the CJam interpreter. Idea We start by ...
user avatar
  • 206k
24 votes

Leap for Leap Seconds!

HTML, 594 bytes ...
user avatar
  • 471

Only top scored, non community-wiki answers of a minimum length are eligible