Skip to main content
Bounty Ended with 100 reputation awarded by Adám
deleted 67 characters in body
Source Link
Kamila Szewczyk
  • 12.6k
  • 1
  • 31
  • 61

APL (Dyalog Extended), 1513 bytes

-42 (changing the input method) thanks to dzaima and ngn@Razetime

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}⍣⎕⊢1

Try it online!

Explanation:

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}
 {⍎4⍴⍕⍵*2}⍣⍵  ⍣⎕⊢1     ⍝ apply the dfn input times
             1     ⍝ .. with initial argument 1
      ⍵*2          ⍝ current value squared
  ⍎4⍴⍕             ⍝ take first 4 digits

Try it online!

APL (Dyalog Extended), 15 bytes

-4 thanks to dzaima and ngn

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!

Explanation:

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}
 {⍎4⍴⍕⍵*2}⍣⍵       ⍝ apply the dfn  times
             1     ⍝ .. with initial argument 1
      ⍵*2          ⍝ current value squared
  ⍎4⍴⍕             ⍝ take first 4 digits

APL (Dyalog Extended), 13 bytes

-2 (changing the input method) thanks to @Razetime

{⍎4⍴⍕⍵*2}⍣⎕⊢1

Explanation:

{⍎4⍴⍕⍵*2}⍣⎕⊢1     ⍝ apply the dfn input times
            1     ⍝ .. with initial argument 1
     ⍵*2          ⍝ current value squared
 ⍎4⍴⍕             ⍝ take first 4 digits

Try it online!

added 222 characters in body
Source Link
Kamila Szewczyk
  • 12.6k
  • 1
  • 31
  • 61

APL (Dyalog Extended), 15 bytes

-4 thanks to dzaima and ngn

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!

Explanation:

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}
 {⍎4⍴⍕⍵*2}⍣⍵       ⍝ apply the dfn ⍵ times
             1     ⍝ .. with initial argument 1
      ⍵*2          ⍝ current value squared
  ⍎4⍴⍕             ⍝ take first 4 digits

APL (Dyalog Extended), 15 bytes

-4 thanks to dzaima and ngn

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!

APL (Dyalog Extended), 15 bytes

-4 thanks to dzaima and ngn

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!

Explanation:

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}
 {⍎4⍴⍕⍵*2}⍣⍵       ⍝ apply the dfn ⍵ times
             1     ⍝ .. with initial argument 1
      ⍵*2          ⍝ current value squared
  ⍎4⍴⍕             ⍝ take first 4 digits
added 13 characters in body
Source Link
Kamila Szewczyk
  • 12.6k
  • 1
  • 31
  • 61

APL (Dyalog Extended), 1915 bytes

-4 thanks to dzaima and ngn

{{⍎4↑∊⍕¨4⍴⍵*2⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!Try it online!

APL (Dyalog Extended), 19 bytes

{{⍎4↑∊⍕¨4⍴⍵*2}⍣⍵⊢1}

Try it online!

APL (Dyalog Extended), 15 bytes

-4 thanks to dzaima and ngn

{{⍎4⍴⍕⍵*2}⍣⍵⊢1}

Try it online!

Source Link
Kamila Szewczyk
  • 12.6k
  • 1
  • 31
  • 61
Loading