2 added 699 characters in body

# MATL, 7 bytes

:gie!Xs


When there is no solution the output is an array containing at least one zero, which is falsy in MATL.

Try it online!Try it online!

### Explanation

Consider inputs m = 10 and n = 4.

:      % Implicitly input m. Push [1 2 ... m]
% STACK: [1 2 3 4 5 6 7 8 9 10]
g      % Logical: convert nonzeros to 1
% STACK: [1 1 1 1 1 1 1 1 1 1]
i      % Input n
% STACK: [1 1 1 1 1 1 1 1 1 1], 4
e      % Reshape into matrix with n rows, padding with zeros
% STACK: [1 1 1;
1 1 1;
1 1 0;
1 1 0]
!      % Transpose
% STACK: [1 1 1 1;
1 1 1 1;
1 1 0 0]
Xs     % Sum of each column. Implicitly display
% STACK: [3 3 2 2]


# MATL, 7 bytes

:gie!Xs


When there is no solution the output is an array containing at least one zero, which is falsy in MATL.

Try it online!

# MATL, 7 bytes

:gie!Xs


When there is no solution the output is an array containing at least one zero, which is falsy in MATL.

Try it online!

### Explanation

Consider inputs m = 10 and n = 4.

:      % Implicitly input m. Push [1 2 ... m]
% STACK: [1 2 3 4 5 6 7 8 9 10]
g      % Logical: convert nonzeros to 1
% STACK: [1 1 1 1 1 1 1 1 1 1]
i      % Input n
% STACK: [1 1 1 1 1 1 1 1 1 1], 4
e      % Reshape into matrix with n rows, padding with zeros
% STACK: [1 1 1;
1 1 1;
1 1 0;
1 1 0]
!      % Transpose
% STACK: [1 1 1 1;
1 1 1 1;
1 1 0 0]
Xs     % Sum of each column. Implicitly display
% STACK: [3 3 2 2]

1

# MATL, 7 bytes

:gie!Xs


When there is no solution the output is an array containing at least one zero, which is falsy in MATL.

Try it online!