Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

It was just a bug

Inspired by the bugged output in @Carcigenicate's Clojure answer for the Print this diamond challenge.

Print this exact text:

1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1234567890
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0
1 2 3 4 5 6 7 8 9 0

(From the middle outward in both directions, each digit is separated by one more space than the previous line.)

Challenge rules:

  • There will be no input (or an empty unused input).
  • Trailing spaces are optional.
  • A single trailing new-line is optional.
  • Leading spaces or new-lines are not allowed.
  • Returning a string-array isn't allowed. You should either output the text, or have a function which returns a single string with correct result.

General rules:

  • This is , so shortest answer in bytes wins.
    Don't let code-golf languages discourage you from posting answers with non-codegolfing languages. Try to come up with an as short as possible answer for 'any' programming language.
  • Standard rules apply for your answer, so you are allowed to use STDIN/STDOUT, functions/method with the proper parameters and return-type, full programs. Your call.
  • Default Loopholes are forbidden.
  • If possible, please add a link with a test for your code.
  • Also, please add an explanation if necessary.

Answer*

Draft saved
Draft discarded
Cancel
10
  • 1
    \$\begingroup\$ Hmm...you could've beaten SOGL if you didn't need the s...does it make sense to join a string with a list or a list with a string? I'll suggest improvement to Adnan. Oh, and there's .∊ for û». \$\endgroup\$ Commented Jul 3, 2017 at 13:06
  • \$\begingroup\$ @EriktheOutgolfer: Or I could switch up my method and save that 1 byte I needed :) \$\endgroup\$ Commented Jul 3, 2017 at 13:32
  • \$\begingroup\$ Sorry already upvoted. \$\endgroup\$ Commented Jul 3, 2017 at 13:33
  • 3
    \$\begingroup\$ That means I'd have upvoted again... \$\endgroup\$ Commented Jul 3, 2017 at 13:36
  • 7
    \$\begingroup\$ 8F9ÝÀNð×ý}».∊ I done did made a spaceship maw! And I was all excited about suggesting a 12-byte edit. \$\endgroup\$ Commented Jul 17, 2017 at 20:10

AltStyle によって変換されたページ (->オリジナル) /