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 37 characters in body
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

Husk, 4(削除) 4 (削除ここまで) 3 bytes

Edit: -1 byte thanks to Leo

ḟṗ↓Nḟṗ→

Try it online! Try it online!

ḟ # first element that
 ṗ # is a prime, among
 ↓N # allcounting integers,up afterbeginning droppingat theone firstgreater nthan =the input

Husk, 4 bytes

ḟṗ↓N

Try it online!

ḟ # first element that
 ṗ # is a prime, among
 ↓N # all integers, after dropping the first n = input

Husk, (削除) 4 (削除ここまで) 3 bytes

Edit: -1 byte thanks to Leo

ḟṗ→

Try it online!

ḟ # first element that
 ṗ # is a prime,
  # counting up beginning at one greater than the input
Source Link
Dominic van Essen
  • 37.2k
  • 2
  • 24
  • 61

Husk, 4 bytes

ḟṗ↓N

Try it online!

ḟ # first element that
 ṗ # is a prime, among
 ↓N # all integers, after dropping the first n = input

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