-1
\$\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\$

closed as too broad by Addison Crump, Conor O'Brien, DJMcMayhem, Deusovi, Denker Mar 9 '16 at 21:01

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    \$\begingroup\$ I'm voting to close this as too broad, as, quote: "There are either too many possible answers..." \$\endgroup\$ – Addison Crump Mar 9 '16 at 20:33
  • \$\begingroup\$ @CoolestVeto How? \$\endgroup\$ – LegionMammal978 Mar 9 '16 at 20:42
  • 5
    \$\begingroup\$ How can you win? This can go on forever. The winner just changes constantly? \$\endgroup\$ – Rɪᴋᴇʀ Mar 9 '16 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 '16 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 '16 at 21:08

16 Answers 16

4
\$\begingroup\$

Answer 8, Carrot, 3 bytes

8^ 

Note the trailing space.

\$\endgroup\$
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\$
3
\$\begingroup\$

Answer 6, pl, 3 characters

6⌂⌂

The last two characters are no-ops.

\$\endgroup\$
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\$
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\$
3
\$\begingroup\$

Answer 15, 05AB1E, 4 characters

4o<?

Try it here.

Basically, it does 2^4 - 1.

\$\endgroup\$
  • \$\begingroup\$ I based my answer on valid answers, ignoring the PHP one. \$\endgroup\$ – Paul Picard Mar 9 '16 at 20:58
  • 1
    \$\begingroup\$ Your language caught my attention on another challenge, so I tried it :D Thanks for creating it @AandN ! \$\endgroup\$ – Paul Picard Mar 9 '16 at 20:59
  • \$\begingroup\$ Haha, no problem :). It's always nice to see someone else use 05AB1E too :). \$\endgroup\$ – Adnan Mar 9 '16 at 21:08
  • \$\begingroup\$ Note: This language is pronounced Osable, not Usable or Osabie. \$\endgroup\$ – Rɪᴋᴇʀ Mar 10 '16 at 2:35
  • \$\begingroup\$ ...It didn't even occur to me it was a word. Welp \$\endgroup\$ – Paul Picard Mar 10 '16 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\$
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\$
  • 1
    \$\begingroup\$ Damnit, was going to post a Vitsy answer. >.< \$\endgroup\$ – Rɪᴋᴇʀ Mar 9 '16 at 19:59
  • \$\begingroup\$ @RikerW Vitsy'd. \$\endgroup\$ – Addison Crump Mar 9 '16 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\$
  • \$\begingroup\$ that was fast. that reminds me i need to include an answer template \$\endgroup\$ – Seadrus Mar 9 '16 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\$
  • \$\begingroup\$ You should've waited till there's a shorter answer in the chain ;) \$\endgroup\$ – ETHproductions Mar 9 '16 at 21:29

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