Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 2 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte a byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

£_j}iY p#a×ばつ :Implicit input of codepoint array
£ :Map each X at index Y
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 iY : Get the Yth integer that returns true
 p : Raise to the power of
 #a88 : 17088
 ÷X : Divide by X
 %75 : Mod 75
 %E : Mod 14
 |1 : Bitwise OR with 1
 Ã :End map
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

£_j}iY p#a×ばつ :Implicit input of codepoint array
£ :Map each X at index Y
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 iY : Get the Yth integer that returns true
 p : Raise to the power of
 #a88 : 17088
 ÷X : Divide by X
 %75 : Mod 75
 %E : Mod 14
 |1 : Bitwise OR with 1
 Ã :End map
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved a byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

£_j}iY p#a×ばつ :Implicit input of codepoint array
£ :Map each X at index Y
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 iY : Get the Yth integer that returns true
 p : Raise to the power of
 #a88 : 17088
 ÷X : Divide by X
 %75 : Mod 75
 %E : Mod 14
 |1 : Bitwise OR with 1
 Ã :End map
 ×ばつ :Reduce by multiplication
deleted 120 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formulaArnauld's formula.

£_j}iY p#a×ばつ

Try it

(Outdated explanation)

Ën"..." ÑÄÃí!p_j£_j}jUl×ばつiY p#a×ばつ  :Implicit input of charactercodepoint array U
Ë£  :Map n"..."each X at index Y
 _ : Convert from base "0s~|A()" to base-10 integer
 : Function Ñtaking an integer as argument
 j : Multiply by 2
 Ä: Is prime?
 } : Add 1
 Ã : End function
 iY :End map
 í : Get the Yth integer that returns true
 :Interleave with
  p !p :And reduce eachRaise pairto bythe inversepower exponentiationof
 #a88 _ : Function taking an integer as argument17088
 ÷X j : IsDivide prime?
by X
 %75 } : End function
  Mod 75
 j %E : Generate an array of integers: that return true ofMod length14
 Ul |1 : LengthBitwise ofOR Uwith 1
 1 Ã :End interleavemap
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

(Outdated explanation)

Ën"..." ÑÄÃí!p_j}jUl×ばつ :Implicit input of character array U
Ë :Map n"..." : Convert from base "0s~|A()" to base-10 integer
 Ñ : Multiply by 2
 Ä : Add 1
 Ã :End map
 í :Interleave with
  !p :And reduce each pair by inverse exponentiation
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
  j : Generate an array of integers that return true of length
 Ul : Length of U
 1 :End interleave
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

£_j}iY p#a×ばつ  :Implicit input of codepoint array
£  :Map each X at index Y
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 iY : Get the Yth integer that returns true
 p : Raise to the power of
 #a88 : 17088
 ÷X : Divide by X
 %75 : Mod 75
 %E : Mod 14
  |1 : Bitwise OR with 1
  Ã :End map
 ×ばつ :Reduce by multiplication
added 97 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95

Japt, (削除) 26 (削除ここまで) 24(削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formula.

£_j}iY pXn"0s~|A()" ×ばつp#a×ばつ

Try it Try it

(Outdated explanation)

Ën"..." ÑÄÃí!p_j}jUl×ばつ :Implicit input of character array U
Ë :Map
 n"..." : Convert from base "0s~|A()" to base-10 integer
 Ñ : Multiply by 2
 Ä : Add 1
 Ã :End map
 í :Interleave with
 !p :And reduce each pair by inverse exponentiation
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 j : Generate an array of integers that return true of length
 Ul : Length of U
 1 :End interleave
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) 24 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

£_j}iY pXn"0s~|A()" ×ばつ

Try it

(Outdated explanation)

Ën"..." ÑÄÃí!p_j}jUl×ばつ :Implicit input of character array U
Ë :Map
 n"..." : Convert from base "0s~|A()" to base-10 integer
 Ñ : Multiply by 2
 Ä : Add 1
 Ã :End map
 í :Interleave with
 !p :And reduce each pair by inverse exponentiation
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 j : Generate an array of integers that return true of length
 Ul : Length of U
 1 :End interleave
 ×ばつ :Reduce by multiplication

Japt, (削除) 26 (削除ここまで) (削除) 24 (削除ここまで) 23 bytes

Ew! Don't think I've ever been more jealous of languages with built-ins for lists of primes and exponents and what-not :\

Input is an array of codepoints. Saved byte by borrowing Arnauld's formula.

£_j}iY p#a×ばつ

Try it

(Outdated explanation)

Ën"..." ÑÄÃí!p_j}jUl×ばつ :Implicit input of character array U
Ë :Map
 n"..." : Convert from base "0s~|A()" to base-10 integer
 Ñ : Multiply by 2
 Ä : Add 1
 Ã :End map
 í :Interleave with
 !p :And reduce each pair by inverse exponentiation
 _ : Function taking an integer as argument
 j : Is prime?
 } : End function
 j : Generate an array of integers that return true of length
 Ul : Length of U
 1 :End interleave
 ×ばつ :Reduce by multiplication
added 27 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading
added 1 character in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading
added 866 characters in body
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading
Source Link
Shaggy
  • 45k
  • 4
  • 39
  • 95
Loading

AltStyle によって変換されたページ (->オリジナル) /