Skip to main content
deleted 12 characters in body
Source Link
Uriel
  • 13.2k
  • 4
  • 17
  • 45

APL (Dyalog), 37 3428 bytes

⍪x/⍨{1=≢∪2-/⍎¨⍕⍵}¨x←11+⍳123456789¨x←11+⍳1E9

Try it online!Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 1234568001e9 into x

¨ - for each

    ⍎¨⍕⍵ - break into digits

    2-/ - get differences list

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

APL (Dyalog), 37 34 bytes

⍪x/⍨{1=≢∪2-/⍎¨⍕⍵}¨x←11+⍳123456789

Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 123456800 into x

¨ - for each

    ⍎¨⍕⍵ - break into digits

    2-/ - get differences list

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

APL (Dyalog), 37 28 bytes

⍪x/⍨{1=≢∪2-/⍎¨⍕⍵}¨x←11+⍳1E9

Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 1e9 into x

¨ - for each

    ⍎¨⍕⍵ - break into digits

    2-/ - get differences list

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

deleted 10 characters in body
Source Link
Uriel
  • 13.2k
  • 4
  • 17
  • 45

APL (Dyalog), 3737 34 bytes

⍪x/⍨{1=≢∪2-/10⊥⍣¯1⊢⍵⍎¨⍕⍵}¨x←11+⍳123456789

Try it online!Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 123456800 into x

¨ - for each

    10⊥⍣¯1⊢⍵⍎¨⍕⍵ - break into digits

    2-/ - subtract each 2 following digitsget differences list

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

APL (Dyalog), 37 bytes

⍪x/⍨{1=≢∪2-/10⊥⍣¯1⊢⍵}¨x←11+⍳123456789

Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 123456800 into x

¨ - for each

    10⊥⍣¯1⊢⍵ - break into digits

    2-/ - subtract each 2 following digits

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

APL (Dyalog), 37 34 bytes

⍪x/⍨{1=≢∪2-/⍎¨⍕⍵}¨x←11+⍳123456789

Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 123456800 into x

¨ - for each

    ⍎¨⍕⍵ - break into digits

    2-/ - get differences list

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify

Source Link
Uriel
  • 13.2k
  • 4
  • 17
  • 45

APL (Dyalog), 37 bytes

⍪x/⍨{1=≢∪2-/10⊥⍣¯1⊢⍵}¨x←11+⍳123456789

Try it online! (with shorter range, due to time-out)

How?

x←11+⍳123456789 - 11, 12... 123456800 into x

¨ - for each

    10⊥⍣¯1⊢⍵ - break into digits

    2-/ - subtract each 2 following digits

     - get unique elements

    1=≢ - length == 1?

x/⍨ - use this as a mask on the range created

- and columnify