Skip to main content
added 15 characters in body
Source Link
Fatalize
  • 39.6k
  • 5
  • 73
  • 165

Brachylog v1, 8 bytes

yb@[rcw\

Try it online!

Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix

Brachylog, 8 bytes

yb@[rcw\

Try it online!

Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix

Brachylog v1, 8 bytes

yb@[rcw\

Try it online!

Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix
Commonmark migration
Source Link

Brachylog, 8 bytes

yb@[rcw\

Try it online!

###Explanation

Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix

Brachylog, 8 bytes

yb@[rcw\

Try it online!

###Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix

Brachylog, 8 bytes

yb@[rcw\

Try it online!

Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix
Source Link
Fatalize
  • 39.6k
  • 5
  • 73
  • 165

Brachylog, 8 bytes

yb@[rcw\

Try it online!

###Explanation

yb         The list [1, ..., Input]
  @[       Take a prefix of that list
    rc     Reverse it and concatenate into an integer
      w    Write to STDOUT
       \   Backtrack: try another prefix