Skip to main content
Commonmark migration
Source Link

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if the accumulator value was a single number in the stack, it but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true. This increases the accumulator (number of stack elements) } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if the accumulator value was a single number in the stack, it but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true. This increases the accumulator (number of stack elements) } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if the accumulator value was a single number in the stack, it but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true. This increases the accumulator (number of stack elements) } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 
deleted 15 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if the accumulator value was a single number in the stack was directly used for the accumulator value, it but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true. This increases the accumulator (number of stack elements) } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if a single number in the stack was directly used for the accumulator value, but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if the accumulator value was a single number in the stack, it but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true. This increases the accumulator (number of stack elements) } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 
deleted 7 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382

MATL, 29 2529 bytes

';#'&mXz!"@o?T}vn127\c&YDvn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description hereenter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if a single number in the stack was directly used for the accumulator value, but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline   ] % End (implicit)  ] % End (implicit)  vx % (Display,Concatenate implicit;stack butand thedelete. stackThis isavoids empty)implicit display 

MATL, 29 25 bytes

';#'&mXz!"@o?T}vn127\c&YD 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if a single number in the stack was directly used for the accumulator value, but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline   % End (implicit)   % End (implicit)   % (Display, implicit; but the stack is empty) 

MATL, 29 bytes

';#'&mXz!"@o?T}vn127\c&YD]]vx 

Input is a string enclosed in single quotes.

Try it online!

The FizzBuzz program is too long for the online interpreters; see it working offline in this gif:

enter image description here

###Explanation

The accumulator value is implemented as the number of elements in the stack. This makes the program slower than if a single number in the stack was directly used for the accumulator value, but saves a few bytes.

';#' % Push this string &m % Input string (implicit). Pushes row vector array of the same size with % entries 1, 2 or 0 for chars equal to ';', '#' or others, respectively Xz % Remove zeros. Gives a column vector ! % Transpose into a row vector " % For each entry @ % Push current entry o? % If odd T % Push true } % Else v % Concatenate stack into a column vector n % Number of elements 127\ % Modulo 127 c % Convert to char &YD % Display immediately without newline ] % End ] % End vx % Concatenate stack and delete. This avoids implicit display 
added 1063 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
added 3 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
Post Undeleted by Luis Mendo
deleted 808 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
Post Deleted by Luis Mendo
added 785 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
added 192 characters in body
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading
Source Link
Luis Mendo
  • 106.7k
  • 10
  • 139
  • 382
Loading