Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Binary-digits/0815/binary-digits-1.0815
Normal file
12
Task/Binary-digits/0815/binary-digits-1.0815
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
}:r:|~ Read numbers in a loop.
|
||||
}:b: Treat the queue as a stack and
|
||||
<:2:= accumulate the binary digits
|
||||
/=>&~ of the given number.
|
||||
^:b:
|
||||
<:0:-> Enqueue negative 1 as a sentinel.
|
||||
{ Dequeue the first binary digit.
|
||||
}:p:
|
||||
~%={+ Rotate each binary digit into place and print it.
|
||||
^:p:
|
||||
<:a:~$ Output a newline.
|
||||
^:r:
|
||||
4
Task/Binary-digits/0815/binary-digits-2.0815
Normal file
4
Task/Binary-digits/0815/binary-digits-2.0815
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
echo -e "5\n32\n2329" | 0815 bin.0
|
||||
101
|
||||
110010
|
||||
10001100101001
|
||||
Loading…
Add table
Add a link
Reference in a new issue