[Question]
  [
Originally the Multiplicative digital root
# Challenge
~~Basically do what the title says~~
# Method
Given a positive integer **1** <= **N** <= **100000000** through one of our [standard input methods](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods), multiply every digit together, ignoring zeroes.
**Ex:** Take a number, say `361218402`:
* `3` \* `6` = `18`
* `18` \* `1` = `18`
* `18` \* `2` = `36`
* `36` \* `1` = `36`
* `36` \* `8` = `288`
* `288` \* `4` = `1152`
* `1152` \* `1` *(ignore zeroes or turn them into ones)* = `1152`
* `1152` \* `2` = `2304`
**The output for `361218402` is `2304`**
***Note: Treat the digit `0` in numbers as `1`.***
# Test Cases
```
1 => 1
10 => 1
20 => 2
100 => 1
999 => 729
21333 => 54
17801 => 56
4969279 => 244944
100000000 => 1
```
[Standard Loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default) are disallowed, and this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so shortest byte count wins!
Congrats to [Jo King](https://codegolf.stackexchange.com/users/76162/jo-king) who got the bounty with [his 70 byte brain-flak answer!](https://codegolf.stackexchange.com/a/153479/69912)
  
[Answer]
# [Haskell](https://www.haskell.org/), 27 bytes
```
foldr((*).max 1.read.pure)1
```
[Try it online!](https://tio.run/##PUtLDsIgFLzKCyswSnjQtGXRI3gCdfHSgjZCJVQTTy9GNM5iZjKfC61XF0Lxw7H4W5gy5xshIz0BZXY0yfTITmCJNC8wQKS0B57yvNxBghdwYMi2wFB9WKuvr2KtrRkaY2rc9apuG9ta3dXStKixb5T@/f5gp/IafaDzWnZjSm8 "Haskell – Try It Online")
## Ungolfed with [UniHaskell](https://github.com/totallyhuman/unihaskell) and `-XUnicodeSyntax`
```
import UniHaskell
f ∷ String → Int
f = product ∘ map (max 1 ∘ read ∘ pure)
```
---
## Explanation
I'll start with what I initially had:
```
product.map(max 1.read.pure)
```
This is a *point-free* expression that evaluates to a function taking a string (or a list of characters) **s** (`"301"`) as an argument. It maps `max 1.read.pure` over **s**, essentially taking each character **i**, injecting it into a list (which makes it a string) (`["3", "0", "1"]`), then reading it, which evaluates the string (`[3, 0, 1]`) and finally taking the greater of **i** and **1** (`[3, 1, 1]`). Then it takes the `product` of the resulting list of integers (`3`).
I then golfed it by a byte with:
```
foldr((*).max 1.read.pure)1
```
This works because `product` is equivalent to `foldr (*) 1`. Instead of mapping and folding, I combined the two by folding with `(*).max 1.read.pure` which takes each non-zero digit and multiplies it with the accumulator.
[Answer]
# [Python 2](https://docs.python.org/2/), 34 bytes
```
f=lambda n:n<1or(n%10or 1)*f(n/10)
```
[Try it online!](https://tio.run/##PU3LCsIwEDzrV8wlNJGI2URat6j/UpFgQbcltAe/Pq4enMMM84CZ38tjklhrvjyH1@0@QHo501SsGApTAbldtnKg4GpWKxgF5EHBI4avKjGzOkopadCdgvZHbjl2/Bv80W83cxllQWMorthfYdq1gYEVD31xrn4A "Python 2 – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes
```
Do1P
```
[Try it online!](https://tio.run/##y0rNyan8/98l3zDg/@H2R01r/v@3tLTUUTCxNLM0MgcyjAwA "Jelly – Try It Online") or see the **[test suite](https://tio.run/##y0rNyan8/98l3zDg/@H2R01r/v@PNtThMjTQ4TIyANFAwtLSEsgzNDY2BgqYWxgA5U0szSyNzC3BCuAgFgA "Jelly – Try It Online")**
## How it works
```
Do1P - Main link. Argument: n (integer)  e.g. 1230456
D    - Digits                                 [1, 2, 3, 0, 4, 5, 6]
 o1  - Replace 0 with 1                       [1, 2, 3, 1, 4, 5, 6]
   P - Product                                720
```
[Answer]
# [R](https://www.r-project.org/), 40 bytes
```
cat(prod((x=scan()%/%10^(0:12)%%10)+!x))
```
[Try it online!](https://tio.run/##K/r/PzmxRKOgKD9FQ6PCtjg5MU9DU1Vf1dAgTsPAytBIUxXI1NRWrNDU/G9sZmhkaGFiYPQfAA "R – Try It Online")
Since input is guaranteed to have no more than 12 digits, this should work nicely. Computes the digits as `x` (including leading zeros), then replaces zeros with `1` and computes the product.
```
cat(					#output
    prod(				#take the product of
         (x=				#set X to
	    scan()			#stdin
		  %/%10^(0:12)%%10)	#integer divide by powers of 10, mod 10, yields digits of the input, with leading zeros. So x is the digits of the input
                                   +!x  #add logical negation, elementwise. !x maps 0->1 and nonzero->0. adding this to x yields 0->1, leaving others unchanged
                                      ))
```
[Answer]
# [C (gcc)](https://gcc.gnu.org), 39 bytes
```
k;f(n){for(k=1;n;n/=10)k*=n%10?:1;k=k;}
```
Needs to be compiled without optimizations (which is the default setting for gcc, anyway).
[Try it online!](https://tio.run/##fY5BCsIwEEX3PUUoFBJRnElK2zgEL@JGIpESOkpxV3r2GHXb@Jfz/jy@P9y9TylSkKyW8JhldEhMfHQIKu4cNwjnE1J0kdY08ktM15GlqpZK5DznfAqybm4XrvciSNOhxqEFrRRtN7BMoIg0/PkqM2ttWYnGmLK1H6C8tLWd1f2GO1Px2/TNp7CmNw)
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~74~~ ~~72~~ 70 bytes
-2 thanks to Nitrodon for suggesting getting the negation of the number so that you only have to increment rather than decrement later
```
{([{}]((((()()()){}){}){}){}){({<({}())><>([[]](){})<>}<><{}>)<>}{}}<>
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/v1ojuro2VgMENEFQs7oWCWlU22hU1wJF7WzsNKKjY2M1QMI2drU2djbVtXYgVnUtkPP/v7GZoZGhhYmB0X/dRAA "Brain-Flak – Try It Online")
There might be a few ways to golf this further, such as  ~~redoing the multiplication to avoid having to initialise the total with 1.~~ (-2 bytes)
### How It Works:
```
{ Loop over every number
  ([{}]((((()()()){}){}){}){}) Add 48 to the negative of the ASCII to get the negation of the digit
  { If the number is not 0
     ({<({}())><>([[]](){})<>}<><{}>)<> Multiply the total by the number
                                          If the total is on an empty stack, add 1
  } 
  {} Pop the excess 0
}<> Switch to the stack with the total
```
[Answer]
# [Pyt](https://github.com/mudkip201/pyt), 3 [bytes](https://github.com/mudkip201/pyt/wiki/Codepage)
```
ąžΠ
```
Explanation:
```
ą       Convert input to array of digits (implicit input as stack is empty)
 ž      Remove all zeroes from the array
  Π     Get the product of the elements of the array
```
[Try it online!](https://tio.run/##K6gs@f//SOvRfecW/P9vbGZoZGhhYmAEAA)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 4 bytes
```
0KSP
```
[Try it online!](https://tio.run/##MzBNTDJM/f/fwDs44P9/E0szA0sjc0sA "05AB1E – Try It Online")
**Explanation**
```
0K     # remove zeroes
  S    # split to list of digits
   P   # product
```
[Answer]
# [J](http://jsoftware.com/), ~~17~~ ~~14~~ 13 bytes
### -4 bytes courtesy of @GalenIvanov
```
[:*/1>.,.&.":
```
[Try it online!](https://tio.run/##DcSxCkBQFAbg3VP8GYg4zrlXOLdYlMlkNepKFmVQnv4yfN8ZYkp39A4pCjDcrySMyzyF1eWVDFRQQrELWeS348IO//j7hTAM/zNUFUastZC2Y0GtjZpWwwc)
Probably can be improved some. Edit: and so it was.
# Explanation
```
[: */ 1 >. ,.&.":
                 ": Convert to string
             ,.     Convert row to column vector
               &.   Convert to numbers
      1 >.        Maximum of each element with 1 (convert 0 to 1)
   */              Product
[:                 Cap fork
```
`&.`-under is a nifty adverb that applies the verb on the right, then the verb on the left, then the *inverse* of the verb on the right. Also converting back to numbers is technically using eval (`".`-do).
[Answer]
# [Python 2](https://docs.python.org/2/), 43 bytes
```
lambda n:eval('*'.join(`n`.replace(*'01')))
```
[Try it online!](https://tio.run/##PY5BDoIwEEX3nGJ2BdKYdlrAktSLAImoJWKwEKgmnh4RC7P6/@XnZYaPu/cW50aXc1c/L7cabG7edReSmBwefWvDsz0fRjN09dWEMWGcRFE0OzO5CTQUZVCIlCM/SoYUBZMVXRCnwP@BbQmXhJ7tUClFIUP1X3AhBIXEK7IjWzRJujapUoXZMkYplZSbZz8vrIKmH@H3HIXRTK/OQWvXPuUBDGNrnedaN@GPR3RdE30i1JP5Cw "Python 2 – Try It Online")
[Answer]
# JavaScript (ES6), 28 bytes
Designed for 32-bit integers.
```
f=n=>!n||(n%10||1)*f(n/10|0)
```
### Test cases
```
f=n=>!n||(n%10||1)*f(n/10|0)
console.log(f(1))        // => 1
console.log(f(10))       // => 1
console.log(f(20))       // => 2
console.log(f(100))      // => 1
console.log(f(999))      // => 729
console.log(f(21333))    // => 54
console.log(f(17801))    // => 56
console.log(f(4969279))  // => 244944
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + coreutils + sed + bc, ~~27~~ ~~24~~ 23 bytes
```
tr 0 1|sed s/\\B/*/g|bc
```
[Try it online!](https://tio.run/##S0oszvj/v6RIwUDBsKY4NUWhWD8mxklfSz@9Jin5/39DLkMDLiMDIGnAZWlpyWVkaGxszGVobmFgyGViaWZpZG4JkoMDLgA "Bash – Try It Online")
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 5 bytes
```
⊇ẹ×ℕ₁
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r//1FX@8NdOw9Pf9Qy9VFT4///xmaGRoYWJgZG/6MA "Brachylog – Try It Online")
### Explanation
```
⊇        Take a subset of the input
 ẹ       Split the subset into a list of digits
  ×      Product
   ℕ₁    This product must be in [1, +∞)
```
This works because `⊇` unifies from large subsets to small subsets, so the first one that will result in a non-zero product is when all zeroes are excluded and nothing else.
[Answer]
# [Perl 5](https://www.perl.org/), 23 + 1 (`-p`) = 24 bytes
```
$\=1;s/./$\*=$&||1/ge}{
```
[Try it online!](https://tio.run/##K0gtyjH9/18lxtbQulhfT18lRstWRa2mxlA/PbW2@v9/QwMj43/5BSWZ@XnF/3ULAA "Perl 5 – Try It Online")
[Answer]
# Java 8, ~~55~~ ~~54~~ ~~53~~ 51 bytes
```
int f(int n){return n>0?(n%10>0?n%10:1)*f(n/10):1;}
```
Port of [*@Dennis*' Python 2 answer](https://codegolf.stackexchange.com/a/153291/52210).  
-1 byte thanks to *@RiaD*.
[Try it here.](https://tio.run/##XZDBbsIwDIbvPIWFNClZNRa3CEjLtifYieO0Q4AWBYpbNSnqhPrsXQjV1mIpsn7b@azfR3VRL0WZ0nF/6na5MgY@labrBMBYZfUOurygA2RMkwXi1yq1dUVA7@KD0RMKl28pRv6cMXpFwWNM2g6grLe5@95TLoXew9mR2cZWmg5f34rflgBkReXZ@g0TvUaR6CDgvgNgU2OZ5snkTzj@QIVi3BtJKeVoFqMoGo0vVwKHhblcyHApHxg@HtbcY1iMFhjiai5CX2zd@7@g93634nw2ve/Nj7HpeVbUdla6i9icWBNMY5gGGWt4j2m7Xw)
**~~55~~ 54 bytes version:**
```
n->{int r=1;for(;n>0;n/=10)r*=n%10>0?n%10:1;return r;}
```
[Try it online.](https://tio.run/##bVDLboMwELz3K1aRKpmiUBuiJI4L/YLmkmPVg0ucyilZkDERVcS3U/M4QJSVH9rZ1czOnuVVLvNC4fn426aZLEv4kBpvTwAarTInmSrYd2kPQEq6Fz3hkMZdd0orrU5hDwgxtLhMbl2LiZk45YYITKjA15hRz7zE@MxoQt@7b8eEUbYyCEY0rRi4iuo7c1wj5TXXR7i4ccjBGo0/n1/SG0bpmDsV7VT0G6NC@77XVwCsKi3R/YRj4rQnWUjntVnKOZ/1siiKZu2bLWVTYMXXPNzwO44@7mSGmILRmoVsu6Lhg3X23gcrzmc9@j78lVZdgryyQeE2YjMktb/YwcLHICW1NxI17T8)
[Answer]
# Julia 0.6, 26 bytes
```
!x=prod(max.(digits(x),1))
```
Example of use:
```
julia> !54
20
```
[Try it online!](https://tio.run/##VY1BCsMgEEX3PYXJSqGEaEzsLAKlZ@gFbBWxNLZUA7m91QZqMoth3jw@/zE/rRxirJbx/XkpPMmlwcoaGzxeyJESEmdvnUEX6XVz1T4cziFtrwOq84HuSfga3bSxbnWowpSMIy3U7pBlZBu71wCQWDAoAdp1Xfr1vITEqc0l/fB/cRiAiZxlnAPn24J1fjXaqfgF "Julia 0.6 – Try It Online")
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 30 bytes
```
f=([a,...b])=>a?(+a||1)*f(b):1
```
[Try it online!](https://tio.run/##BcFRDkQwEADQ68wsJlqbjazgIOJjVCtEjLTiy93HexvfnFxcz6s4ZPaqoYWBcyKaRmw77iHj5zH4CTDh32jj5Eiye9plgQBnFOdTIo7LPdgRsVGtfsaa@lvaFw "JavaScript (Node.js) – Try It Online")
Takes **string** as an input, treats it as array, and by array destructuring separates the first element `[a,...b]`. `+a||1` returns digit corresponding to `a` character. I guess that rest is self explaining..
[Answer]
# [Octave](https://www.gnu.org/software/octave/), 21 bytes
*Thanks to @Luis Mendo for saving a byte and thanks to @alephalpha for saving another byte!*
```
@(n)prod((k=n-48)+~k)
```
Takes input as a string of digits.
[Try it online!](https://tio.run/##y08uSSxL/f/fQSNPs6AoP0VDI9s2T9fEQlO7Llvzf5qCrUJiXrE1F1eahrqxmaGRoYWJgZG6JohrCKUMILSRAYwPZVhaWkJlDI2NjaGS5hYGUH0mlmaWRuaWcE1woK75HwA)
**30 bytes:**
```
@(n)prod((k=num2str(n)-48)+~k)
```
Takes input as a number.
[Try it online!](https://tio.run/##y08uSSxL/f/fQSNPs6AoP0VDI9s2rzTXqLikCCiia2KhqV2Xrfk/TcFWITGv2JqLK03D2MzQyNDCxMBIE8gxBBMGINLIAMIGU5aWlmAxQ2NjY7CwuYUBWK2JpZmlkbklVCkcaP4HAA)
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 3 bytes
```
fꜝΠ
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJBIiwiIiwiZuqcnc6gIiwiIiwiMzYxMjE4NDAyIl0=)
Pyt isn't the only language to do 3 bytes :3
### Explained
```
fꜝΠ
f   # flatten to a list
 ꜝ  # remove all 0's
  Π # product
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 88 bytes
Readable version:
```
#Push a 1 onto the alternate stack. Return to the main stack
(<>())<>
#While True:
{
    #Push the current digit minus 48 (the ASCII value of '0') onto the alternate stack
    ({}[((((()()()){}){}){}){}]<>)
    #If it's not 0...
    {
        (<
            #Multiply the top two values (the current digit and the current product that started at 1)
            ({}<>)({<({}[()])><>({})<>}{}<><{}>)
        #Also push a 0
        >)
    #Endwhile
    }
    #Pop the 0
    {}
    #Return to the main stack
    <>
#Endwhile
}
#Toggle to the alternate stack, and implicitly display
<>
```
[Try it online!](https://tio.run/##PY2xCoBACIb3e4pGHQ5qqkF8kbjhGoIoGlrFZze9jlRU9Pt1e@px5/2qpxkQAyJxSpLS4AaiK4RhOIr@UYjxY6TlRpPzPgehJsSC7BedJ9bYkCij6wLWru7Vn3pHbDbNyzhZri8 "Brain-Flak – Try It Online")
[Answer]
# [Clojure](https://clojure.org/), 56 bytes
```
(fn[n](apply *(replace{0 1}(map #(-(int %)48)(str n)))))
```
Pretty basic. Turns the number into a string, then subtracts 48 from each character to turn them back into numbers. It then replaces each 0 with a 1, and applies `*` to the resulting list of numbers (which reduces `*` over the list). Can accept a number, or a stringified number.
[Try it online!](https://tio.run/##S87JzyotSv2vUVCUmVeSk6eg8V8jLS86L1YjsaAgp1JBS6MotSAnMTm12kDBsFYjN7FAQVlDVwOoVkFV08RCU6O4pEghTxME/isZmxkaGVqYGBgpAXkA "Clojure – Try It Online")
```
(defn non-zero-prod [n]
  (let [; Abusing strings to get each digit individually
        str-n (str n)
        
        ; Then turn them back into numbers
        digits (map #(- (int %) 48) str-n)
        ; Substitute each 0 for a 1
        replaced (replace {0 1} digits)]
    
    ; Then get the product
    (apply * replaced)))
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 5 bytes
```
!UXzp
```
Input is taken as a string
Try it at [MATL Online!](https://matl.suever.net/?code=%21UXzp&inputs=%27361218402%27&version=20.6.0) Or [verify test cases in Try It Online!](https://tio.run/##y00syfmf8F8xNKKq4L9LyH91Q3UudVMgNjQAEkYGYBaItLS0BAkYGhsbg8TMLQxAKk0szSyNzC0hquBAHQA)
### Explanation
```
!     % Implicit input: string (row vector of chars). Transpose into
      % a column vector of chars
U     % Convert from string to number. Treats each row independently,
      % producing a column vector of numbers
Xz    % Keep only nonzeros
p     % Product. Implicit display
```
[Answer]
# Befunge, ~~23~~ 22 bytes
```
1<*_$#`.#0@#:+!:-"0"~$
```
[Try it online!](http://befunge.tryitonline.net/#code=MTwqXyQjYC4jMEAjOishOi0iMCJ+JA&input=MzYxMjE4NDAy)
**Explanation**
```
1<                        Push 1, turn back left, and push a second 1.       
                     $    Drop one of them, leaving a single 1, the initial product.
                -"0"~     Read a char and subtract ASCII '0', converting to a number.
             +!:          If it's 0, make it 1 (this is n + !n).
      `  0  :             Then test if it's greater than 0, to check for EOF.
   _                      If it is greater than 0, it wasn't EOF, so we continue left.
  *                       Multiply with the current product, becoming the new product.
1<                        Now we repeat the loop, but this time push only a single 1...
                     $    ...which is immediately dropped, leaving the current product.
   _                      On EOF, the input value will be negative, so we branch right.
    $                     We don't need the input, so drop it.
       .  @               Leaving us with the product, which we output, then exit.
```
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 36 33 bytes
Simple Javascript (ES6) method that takes input as number string, spreads it into an array, then reduces it through multiplication or returns the value if the result is 0.
3 bytes saved thanks to [Shaggy](https://codegolf.stackexchange.com/users/58974/shaggy)
```
s=>[...s].reduce((a,b)=>b*a||a,1)
```
[Try it online!](https://tio.run/##BcFRCoMwDADQ/52kFRfWKmMg9SLiR9oG2RAjifPLu8f3fniiFvnux3PjSibJNI0TAOgMQvVfyDlss09jbvC6sA3ehkfhTXklWHlx4nbhQqqAspxTnL0fzLp3iOHTv@IN "JavaScript (Node.js) – Try It Online")
[Answer]
# Ruby, ~~42~~ ~~40~~ ~~35~~ ~~32~~ 27 bytes
```
p eval (gets.chars-[?0])*?*
```
Assumes no newlines in input
[Major influence](https://codegolf.stackexchange.com/a/153290/55458)
-2 bytes thanks to @GolfWolf
-5 bytes thanks to @Conor O'Brien
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 45 bytes
```
s->s.chars().reduce(1,(a,b)->b<49?a:a*(b-48))
```
[Try it online!](https://tio.run/##ZU/LasMwELznKwZDQEplYSduEudVein00FN6Kz3Ir1SpIxlLDoSQb3dlOzl1QbswM5phjuIsfF3l6pj9tvJU6dri6DDeWFnyyXr0DysalVqpVUdWTVLKFGkpjMGHkArXEXBHjRXWnbOWGU6OI3tbS3X4@oaoD4b2UuBTvyv7dvfcDJIdCmxb4@8MT39EbQjldZ41aU5CRgRLqL9LNlH8IlZiQhI/WlLarns3qazzt7mxBltcETJMGWYMEcMzw5xhwbBkiBnCwHFBd92KY4dMw9nMScPFMnD/ongeTxe98D64DSGFrkFcUp@zGtIedYD9xdj8xHVjeeXK2IJ44zAwK4yzsfJYL2couKiq8vJqXHvieU8dSungfxt179b@AQ "Java (OpenJDK 8) – Try It Online")
[Answer]
# [Ruby + `-n`](https://codegolf.meta.stackexchange.com/questions/13792/a-proposal-on-command-line-flags), 25 bytes
```
p eval ($_.chars-[?0])*?*
```
[Try it online!](https://tio.run/##KypNqvz/v0AhtSwxR0FDJV4vOSOxqFg32t4gVlPLXuv/f0MjYxNTg3/5BSWZ@XnF/3XzAA "Ruby – Try It Online")
### [Ruby (vanilla)](https://www.ruby-lang.org/), 27 bytes
```
p eval (gets.chars-[?0])*?*
```
[Try it online!](https://tio.run/##KypNqvz/v0AhtSwxR0EjPbWkWC85I7GoWDfa3iBWU8te6/9/QyNjE1MDAA)
[Answer]
# **[C#](https://docs.microsoft.com/en-us/dotnet/csharp/), 97 Bytes (First code golf)**
```
static int X(int y){var z=y.ToString();int r=1;foreach(var q in z){if(q!=48){r*=q-48;}}return r;}
```
Not sure if i had to wrap it in a method or not so just included it to be safe.
Takes an Int in, converts it to a string and returns the multiple of each of the characters ignoring 0's. Had to minus 48 due to the program using the ascii value as it reads it as a char.
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 46 bytes
```
i.Select(c=>c>48?c-48:1).Aggregate((p,c)=>p*c)
```
[Try it online!](https://tio.run/##jY/BisIwEIbvPsVQPCSiJZMUbdRmWYQFwZuHPS9DLAGJ0saT@OxVSdDLYvuf/oHvG2aonVHrup@Lp/U@NM7XU9j6oKSBA1TgoDKdy/f2aCkwqgyZovyiWVEukeffdd3Y@i9Yxs5T4pU5T4h3q9Foc/Lt6Wjz38YFu3PeMhhnao4Sy0LIJVwP7D1m/JYBX/0vQQyKKKEYQstEyyE0itfuIbjWOuKP0otLVEqlW561V8BFKTCd86w9QqHnWi7SQWn4qDx@jHm9HJOk7g4 "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [Rockstar](https://codewithrockstar.com/), 61 bytes
```
Listen to N
Cut N
O's 1
While N
Let O be*roll N-0 or 1
Say O
```
[Try it](https://codewithrockstar.com/online) (Code will need to be pasted in)
]