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

Commonmark migration
Source Link

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the index of the concatenated divisors (indexing wraps around) and prints

Explanation

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,
тL # push [1,...,100]
 ʒ # for each...
 "Fizz" # Push Fizz (didn't find a way to shorten this one sadly)
 D # Duplicate
 'ÒÖTM # Push Buzz
 D # Duplicate
 Š # Move top item on the stack two slots down
 « # Concatenate the top items (Results in FizzBuzz)
 ) # Wrap stack to array
 „ # Get Divisors of N
 D5å # Does 5 divide it?
 s3å # Does 3 divide it?
 « # Concatenate top two items
 è, # Gets item in the array at the index of the concatenated divisors (indexing wraps around) and prints 
 

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the index of the concatenated divisors (indexing wraps around) and prints

Explanation

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,
тL # push [1,...,100]
 ʒ # for each...
 "Fizz" # Push Fizz (didn't find a way to shorten this one sadly)
 D # Duplicate
 'ÒÖTM # Push Buzz
 D # Duplicate
 Š # Move top item on the stack two slots down
 « # Concatenate the top items (Results in FizzBuzz)
 ) # Wrap stack to array
 „ # Get Divisors of N
 D5å # Does 5 divide it?
 s3å # Does 3 divide it?
 « # Concatenate top two items
 è, # Gets item in the array at the index of the concatenated divisors (indexing wraps around) and prints 
 
added 17 characters in body
Source Link
Datboi
  • 1.3k
  • 8
  • 9

05AB1E, 29 bytes

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,

Try it online!

To my surprise (or my incapability to use the search function) there was no 05AB1E answer to this question.

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the binary index of the concatenated divisors (indexing wraps around) and prints

05AB1E, 29 bytes

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,

Try it online!

To my surprise (or my incapability to use the search function) there was no 05AB1E answer to this question.

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the binary index of the concatenated divisors and prints

05AB1E, 29 bytes

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,

Try it online!

To my surprise (or my incapability to use the search function) there was no 05AB1E answer to this question.

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the index of the concatenated divisors (indexing wraps around) and prints

Source Link
Datboi
  • 1.3k
  • 8
  • 9

05AB1E, 29 bytes

тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è,

Try it online!

To my surprise (or my incapability to use the search function) there was no 05AB1E answer to this question.

###Explanation### тLʒ"Fizz"D'ÒÖTMDŠ«)¬ÑD5ås3å«è, тL # push [1,...,100] ʒ # for each... "Fizz" # Push Fizz (didn't find a way to shorten this one sadly) D # Duplicate 'ÒÖTM # Push Buzz D # Duplicate Š # Move top item on the stack two slots down « # Concatenate the top items (Results in FizzBuzz) ) # Wrap stack to array ¬Ñ # Get Divisors of N D5å # Does 5 divide it? s3å # Does 3 divide it? « # Concatenate top two items è, # Gets item in the array at the binary index of the concatenated divisors and prints

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