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 Revisions

3 of 3
deleted 155 characters in body
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, (削除) 24 (削除ここまで) 20 bytes

3μ3,5ḍTị"¡Ṭ4"Ụp»ȯμ€G

Try it online!

How it works

3μ3,5ḍTị"¡Ṭ4"Ụp»ȯμ€G Main link. No input.
3 Yield 100.
 μ Begin a new, monadic chain.
 μ€ Apply the preceding chain to all integers n in [1, ..., 100].
 3,5ḍ Test n for divisibility by 3 and 5.
 T Get all truthy indices.
 This yields [1] (mult. of 3, not 5), [2] (mult. of 5, not 3),
 [1, 2] (mult. of 15) or [].
 "¡Ṭ4"Ụp» Yield ['Fizz', 'Buzz'] by indexing in a dictionary.
 ị Retrieve the strings at the corr. indices.
 ȯ Logical OR hook; replace an empty list with n.
 G Grid; join the list, separating by linefeeds.
Dennis
  • 211.7k
  • 41
  • 380
  • 830

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