205 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Retina, score 1 The empty program counts the number of matches of the empty regex in the input (which is the empty string). That's exactly 1 match, so it prints ...
Martin Ender's user avatar
155 votes

Write Moby Dick, approximately

///, 2*1 + 1020874 = 1020876 Prints a space.
daniero's user avatar
  • 18.6k
109 votes

Write Moby Dick, approximately

Perl, 2·70525 + 326508 = 467558 Predictor ...
A. Rex's user avatar
  • 2,579
102 votes

Write Moby Dick, approximately

Node.js, 2*224 + 524279 = 524727 Please refer to the change log at the end of this post for score updates. A function taking and returning a byte. ...
Arnauld's user avatar
  • 191k
78 votes

Write Moby Dick, approximately

Python 3, 2·267 + 510193 = 510727 Predictor ...
Anders Kaseorg's user avatar
76 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Pyth, 10 T First attempt at using Pyth. Having had the question clarified, it seems 10 will be the smallest number. In Pyth the letter T starts off as the number ...
Tom Carpenter's user avatar
62 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

bc, 10 A Luckily, bc prints the result of the last expression by default. A is interpreted ...
Digital Trauma's user avatar
56 votes

Write Moby Dick, approximately

Python 3, 2*279+592920=593478 2*250 + 592467 = 592967 2 * 271 + 592084 = 592626 2 * 278 + 592059 = 592615 2 * 285 + 586660 = 587230 2 * 320 + 585161 = 585801 2 * 339 + 585050 = 585728 ...
Michael Homer's user avatar
50 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Fishing, score 7,958,661,109,946,400,884,391,936 1,208,925,819,614,629,174,706,176 Is this the highest non-trivial-looking score ever in a minimization challenge? (Even though it has been golfed by 84....
Arcturus's user avatar
  • 7,347
40 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

MATLAB, 1,000,000,000 (109) Also works with Octave disp(1e9) Never going to beat the esolangs, but just for fun, this is the smallest MATLAB/Octave will be able to ...
Tom Carpenter's user avatar
30 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

TI-84 BASIC, 120 5! ᴇ2 would score better if not for the silly UTF-8 requirement. (It's only two bytes in the calculator's ...
SuperJedi224's user avatar
  • 11.9k
28 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Hexagony, score 100100 Code: d!!@ In a more readable form: d ! ! @ . . . The char value of ...
Adnan's user avatar
  • 44.3k
27 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

C#, score 10^72 10^70 10^64 10^63 class A{static void Main(){System.Console.Write($"1{0:D63}");}} That's 1,000,000,000,000,000,000,000,000,000,000,000,000,000,...
LegionMammal978's user avatar
25 votes

Write Moby Dick, approximately

C++, score: 2*132 + 865821 = 866085 Thanks to @Quentin for saving 217 bytes! ...
Steadybox's user avatar
  • 16.5k
22 votes

Write Moby Dick, approximately

Python, 2*516 + 521122 = 522154 Algorithm: Yet another python submission, this algorithm calculates the most likely next letter looking at sequences of length 1,...,l. The sum of probabilities is ...
user2699's user avatar
  • 648
21 votes

Hunt for discount

Python 3, 33 bytes lambda a:sum(sorted(a)[-2::-2])/2 Try it online! This is my first answer :D
Basto's user avatar
  • 553
20 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

JavaScript, score 100,000,000,000 (or 1*1011) alert(1e11) This is if using alert. Though you can get 100 000 000 times lesser score if using console: <...
nicael's user avatar
  • 4,821
20 votes

Make me a minimum magic sum

Python 2, 44 bytes a,b,c,d=sorted(input()) print min(c-a,d-b)*2 Try it online! Sorts the input as a,b,c,d, in ascending ...
xnor's user avatar
  • 145k
19 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

PlatyPar, 59 # # starts a numeric base-60 literal, and since no digits are found, it ends up as ...
Cyoce's user avatar
  • 3,331
19 votes

Write Moby Dick, approximately

C++, 2·62829 + 318786 = 444444 To run this program, you need this file here, which must be named C. The program uses the same combination of Markov models as in ...
A. Rex's user avatar
  • 2,579
18 votes
Accepted

Shortest 2-Player Game of Halma

The shortest game of halma is 49 moves 49 move solution Proof there is no 48-move solution Code used for this solution The code now supports pass Notice that the 47 move solution in the paper is ...
Ton Hospel's user avatar
  • 14.8k
18 votes

Island Golf #1: Circumnavigation

Mathematica (version 9), 165 bytes The nice, short ConvexHullMesh function that Greg Martin used was only introduced in Mathematica version 10, so I thought I'd ...
Not a tree's user avatar
  • 3,206
18 votes

Plight of the Concorde

88 Cities, 341 seconds runtime on NEOS In a recent paper we constructed a family of hard to solve euclidean TSP instances. You can download the instances from this family as well as code for ...
Stefan Hougardy's user avatar
17 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

C, 1000000000000000000000000000 (28 digits) main(){printf("1%027d",0);} Similar to my C++ answer, without the ...
Glenn Randers-Pehrson's user avatar
17 votes

Given a list of circles, output the area of the smallest containing rectangle

Python 2 + PySCIPOpt, 267 bytes ...
Anders Kaseorg's user avatar
16 votes

What is the smallest positive base 10 integer that can be printed by a program shorter (in characters) than itself?

Brainf**k, 11111111111111111111111111111111111 (~1e34) And another reduction: +++++++[>+++++++>+<<-]>>[<.....>-] Which gives 35 consecutive ...
Tom Carpenter's user avatar
16 votes

Find the maximum deviation

Dyalog APL, 7 bytes ⌈/⌈/-⌊/ Test it on TryAPL. How it works ...
Dennis's user avatar
  • 210k
16 votes

Write Moby Dick, approximately

sh+bzip2, 2*364106 = 728212 2*381249 + 0 = 762498 dd if=$0 bs=1 skip=49|bunzip2&exec cat>/dev/null followed by the bzip2-compressed whale2.txt with the ...
Joshua's user avatar
  • 3,456
15 votes

Piet (Mondrian)'s Puzzle

Piet, 9625 (It finally works!) The people demanded it, so here it is. This is an extremely naive solution (essentially the same as the loose upper bounds on the OEIS page): it divides each square ...
Tim Pederick's user avatar
  • 1,721

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