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

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

add link to gs2 on github
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 28
  • 26

gs2gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

fix singular / plural inconsistency
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 28
  • 26

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (createscreate block from previous 5 tokens, then callscall map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (creates block from previous 5 tokens, then calls map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

gs2, (削除) 28 (削除ここまで) 27 (without f)

Hex:

1b 2f fe cc 04 46 69 7a 7a 09 07 42 75 7a 7a 19 06 27 2d d8 62 32 ec 99 dc 61 0a

Explanation:

1b 100
2f range1 (1..n)
fe m: (map rest of program)
cc put0 (pop and store in register 0)
04 string-begin
Fizz
09 9
07 string-separator
Buzz
19 25
06 string-end-array (result: ["Fizz"+chr(9) "Buzz"+chr(25)])
27 right-uncons
2d sqrt
d8 tuck0 (insert value of register 0 under top of stack)
62 divides
32 times (string multiplication)
ec m5 (create block from previous 5 tokens, then call map)
99 flatten
dc show0 (convert register 0 to string and push it)
61 logical-or
0a newline

Embedding 3 and 5 into the string constant doesn't work because \x05 ends string literals.

Note: This problem can be solved in 1 byte with gs2 using the built-in f.

improvement
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 28
  • 26
Loading
took out something obvious
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 28
  • 26
Loading
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 28
  • 26
Loading

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