Skip to main content
-1
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog Classic), 2121 20 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨30⍸↑,\⎕⍨\⎕

Try it online!Try it online!

uses ⎕io←1

25 30⍸x is 0 if x<25, 1 if 25≤x<30, or 2 otherwise

we compute cumulative products of these starting from (or equivalently: ending at) all possible locations, discard the first 4 products, and detect the presence of products ≥8 (which is 23)

APL (Dyalog Classic), 21 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨,\⎕

Try it online!

uses ⎕io←1

25 30⍸x is 0 if x<25, 1 if 25≤x<30, or 2 otherwise

we compute cumulative products of these starting from (or equivalently: ending at) all possible locations, discard the first 4 products, and detect the presence of products ≥8 (which is 23)

APL (Dyalog Classic), 21 20 bytes

1∊8≤4↓⍉×\25 30⍸↑,⍨\⎕

Try it online!

uses ⎕io←1

25 30⍸x is 0 if x<25, 1 if 25≤x<30, or 2 otherwise

we compute cumulative products of these starting from (or equivalently: ending at) all possible locations, discard the first 4 products, and detect the presence of products ≥8 (which is 23)

added 237 characters in body
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog Classic), 21 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨,\⎕

Try it online!

uses ⎕io←1

25 30⍸x is 0 if x<25, 1 if 25≤x<30, or 2 otherwise

we compute cumulative products of these starting from (or equivalently: ending at) all possible locations, discard the first 4 products, and detect the presence of products ≥8 (which is 23)

APL (Dyalog Classic), 21 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨,\⎕

Try it online!

uses ⎕io←1

APL (Dyalog Classic), 21 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨,\⎕

Try it online!

uses ⎕io←1

25 30⍸x is 0 if x<25, 1 if 25≤x<30, or 2 otherwise

we compute cumulative products of these starting from (or equivalently: ending at) all possible locations, discard the first 4 products, and detect the presence of products ≥8 (which is 23)

Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

APL (Dyalog Classic), 21 bytes

1∊8≤4↓⍉×\25 30⍸↑⌽¨,\⎕

Try it online!

uses ⎕io←1