Skip to main content
Commonmark migration
Source Link

##Mandatory APL answer - 21 22

Mandatory APL answer - 21 22

"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111

##Mandatory APL answer - 21 22

"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111

Mandatory APL answer - 21 22

"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111
save 1 char
Source Link
mniip
  • 9.5k
  • 4
  • 31
  • 57

##Mandatory APL answer - 2221 22

"01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111

P.S Hmmm, not sure why does -3 work... It's supposed to be ¯3

##Mandatory APL answer - 22

"01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 32767
0111111111111111

P.S Hmmm, not sure why does -3 work... It's supposed to be ¯3

##Mandatory APL answer - 21 22

"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111
Source Link
mniip
  • 9.5k
  • 4
  • 31
  • 57

##Mandatory APL answer - 22

"01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]

Examples:

      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖¯1+⍳16]
⎕: 32767
0111111111111111

P.S Hmmm, not sure why does -3 work... It's supposed to be ¯3