0
\$\begingroup\$

Your task is to print a number. Simple, right? It is simple, but not as simple as this. The first answer is to print the number 1, the second answer is to print the number 2, etc.

Rules

  1. The first answer must print 1, and the nth answer must print n.
  2. The first answer may be of any length.
  3. Whitespace, comments, etc. are permitted.
  4. The next answer's submission's length must within 1 unit of the previous answer's length. That is, if a submissions length is L, the next submission must be of length L + 1 or L - 1. The length is measured in characters, not bytes.
  5. No language may be used more than once.
  6. No person may answer earlier than eight hours after their most recent answer.
  7. No person may answer twice in a row.
  8. You may not use a REPL environment.

To win, you must have the most valid answers to this question. You may use a language updated after/ made later than this challenge so long as the language was not intended to answer this challenge.

Answer template

All answers must conform to this template.

# Answer N, Lang name, M characters

    program

 optional description

Leader board

A leader board will be maintained here in this section. (If anyone wants to create a leader board counting the number of submissions a person has, I will give them a 50 rep bounty on any answer to this question.)

\$\endgroup\$
7
  • 3
    \$\begingroup\$ I'm voting to close this as too broad, as, quote: "There are either too many possible answers..." \$\endgroup\$ Mar 9, 2016 at 20:33
  • \$\begingroup\$ @CoolestVeto How? \$\endgroup\$ Mar 9, 2016 at 20:42
  • 5
    \$\begingroup\$ How can you win? This can go on forever. The winner just changes constantly? \$\endgroup\$
    – Riker
    Mar 9, 2016 at 20:43
  • 8
    \$\begingroup\$ The idea is good, but it needs something to make it harder after each answer. This would have benefited from some time in the sandbox. \$\endgroup\$
    – DJMcMayhem
    Mar 9, 2016 at 20:48
  • 3
    \$\begingroup\$ This is far too broad in my opinion. You can basically fill your code with no-ops until the desired number of bytes is reached. \$\endgroup\$
    – Adnan
    Mar 9, 2016 at 21:08

16 Answers 16

4
\$\begingroup\$

Answer 8, Carrot, 3 bytes

8^ 

Note the trailing space.

\$\endgroup\$
0
3
\$\begingroup\$

Answer 2, GolfScript, 1 character

2

Pushes the number 2 to the stack.

\$\endgroup\$
3
\$\begingroup\$

Answer 5, dc, 2 characters

5p

Pushes 5 and prints it.

\$\endgroup\$
3
\$\begingroup\$

Answer 4, CJam, 3 characters

2))

Pushes 2 and increments twice.

Other solutions:

C4/
D5%
T3+
\$\endgroup\$
0
3
\$\begingroup\$

Answer 6, pl, 3 characters

6⌂⌂

The last two characters are no-ops.

\$\endgroup\$
0
3
\$\begingroup\$

Answer 7, Befunge, 4 characters

43+.

Add 4 to the stack, then 3, add the top 2 stack values, then print the top value as an int.

\$\endgroup\$
3
\$\begingroup\$

Answer 10, PowerShell, 3 chars

+10

Even when not golfing we need to golf. :) Frustratingly, though, here the + is superfluous, but we can't go down to 2 chars since the Fission answer was 4.

\$\endgroup\$
1
3
\$\begingroup\$

Answer 12, MSM, 3 characters

.21

. concatenates the two rightmost elements 2 and 1 to 12. MSM stops when there's only one element left.

\$\endgroup\$
3
\$\begingroup\$

Answer 13, TI-BASIC, 2 characters

13

Pretty much.

\$\endgroup\$
0
3
\$\begingroup\$

Answer 15, 05AB1E, 4 characters

4o<?

Try it here.

Basically, it does 2^4 - 1.

\$\endgroup\$
5
  • \$\begingroup\$ I based my answer on valid answers, ignoring the PHP one. \$\endgroup\$
    – Sake
    Mar 9, 2016 at 20:58
  • 1
    \$\begingroup\$ Your language caught my attention on another challenge, so I tried it :D Thanks for creating it @AandN ! \$\endgroup\$
    – Sake
    Mar 9, 2016 at 20:59
  • \$\begingroup\$ Haha, no problem :). It's always nice to see someone else use 05AB1E too :). \$\endgroup\$
    – Adnan
    Mar 9, 2016 at 21:08
  • \$\begingroup\$ Note: This language is pronounced Osable, not Usable or Osabie. \$\endgroup\$
    – Riker
    Mar 10, 2016 at 2:35
  • \$\begingroup\$ ...It didn't even occur to me it was a word. Welp \$\endgroup\$
    – Sake
    Mar 10, 2016 at 16:29
3
\$\begingroup\$

Answer 14, Pylons, 3 characters.

B4+

Pushes 10 and 4 to the stack and then adds them.

Try it online

\$\endgroup\$
0
2
\$\begingroup\$

Answer 3, Vitsy, 2 bytes

3N

Pushes three, outputs three.

Try it online!

For lols, verbose mode:

push 3;
output top as number;
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Damnit, was going to post a Vitsy answer. >.< \$\endgroup\$
    – Riker
    Mar 9, 2016 at 19:59
  • \$\begingroup\$ @RikerW Vitsy'd. \$\endgroup\$ Mar 9, 2016 at 20:00
2
\$\begingroup\$

Answer 1, Retina, 0 characters



The empty program outputs the number of matches on the input. Since the empty program matches the input once, 1 is outputted.. Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ that was fast. that reminds me i need to include an answer template \$\endgroup\$
    – Seadrus
    Mar 9, 2016 at 19:27
2
\$\begingroup\$

Answer 9, Fission, 4 characters

R'9O

Creates an atom moving right
Sets its mass to character value of 9
Outputs the ascii character of the mass and destroys the atom

Try it online

\$\endgroup\$
2
\$\begingroup\$

Answer 11, Pyth, 2 characters

11

Yawn...

\$\endgroup\$
2
\$\begingroup\$

Answer 16, Jelly, 3 characters

⁴OO

The two O's was just to fill the remaining 2 characters. Test here.

\$\endgroup\$
1
  • \$\begingroup\$ You should've waited till there's a shorter answer in the chain ;) \$\endgroup\$ Mar 9, 2016 at 21:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.