MATL, 29 bytes
24:q60:qt&Z*t!si=Y)'%i:'8:)&V
###Explanation
Explanation
24:q % Push [0 1 ... 23]
60:q % Push [0 1 ... 59]
t % Duplicate
&Z* % Cartesian product of the three arrays. This gives a matrix with each
% on a different row Cartesian tuple
t! % Push a transposed copy
s % Sum of each column
i= % Logical mask of values that equal the input
Y) % Select rows based on that mask
'%i:' % Push this string
8:) % Index (modularly) with [1 2 ... 8]: gives string '%i:%i:%i'
&V % Convert to string with that format specification. Implicitly display
MATL, 29 bytes
24:q60:qt&Z*t!si=Y)'%i:'8:)&V
###Explanation
24:q % Push [0 1 ... 23]
60:q % Push [0 1 ... 59]
t % Duplicate
&Z* % Cartesian product of the three arrays. This gives a matrix with each
% on a different row Cartesian tuple
t! % Push a transposed copy
s % Sum of each column
i= % Logical mask of values that equal the input
Y) % Select rows based on that mask
'%i:' % Push this string
8:) % Index (modularly) with [1 2 ... 8]: gives string '%i:%i:%i'
&V % Convert to string with that format specification. Implicitly display
MATL, 29 bytes
24:q60:qt&Z*t!si=Y)'%i:'8:)&V
Explanation
24:q % Push [0 1 ... 23]
60:q % Push [0 1 ... 59]
t % Duplicate
&Z* % Cartesian product of the three arrays. This gives a matrix with each
% on a different row Cartesian tuple
t! % Push a transposed copy
s % Sum of each column
i= % Logical mask of values that equal the input
Y) % Select rows based on that mask
'%i:' % Push this string
8:) % Index (modularly) with [1 2 ... 8]: gives string '%i:%i:%i'
&V % Convert to string with that format specification. Implicitly display
MATL, 29 bytes
24:q60:qt&Z*t!si=Y)'%i:'8:)&V
###Explanation
24:q % Push [0 1 ... 23]
60:q % Push [0 1 ... 59]
t % Duplicate
&Z* % Cartesian product of the three arrays. This gives a matrix with each
% on a different row Cartesian tuple
t! % Push a transposed copy
s % Sum of each column
i= % Logical mask of values that equal the input
Y) % Select rows based on that mask
'%i:' % Push this string
8:) % Index (modularly) with [1 2 ... 8]: gives string '%i:%i:%i'
&V % Convert to string with that format specification. Implicitly display
MATL, 29 bytes
24:q60:qt&Z*t!si=Y)'%i:'8:)&V
###Explanation
24:q % Push [0 1 ... 23]
60:q % Push [0 1 ... 59]
t % Duplicate
&Z* % Cartesian product of the three arrays. This gives a matrix with each
% on a different row Cartesian tuple
t! % Push a transposed copy
s % Sum of each column
i= % Logical mask of values that equal the input
Y) % Select rows based on that mask
'%i:' % Push this string
8:) % Index (modularly) with [1 2 ... 8]: gives string '%i:%i:%i'
&V % Convert to string with that format specification. Implicitly display