Mathematica, 20(削除) 20 (削除ここまで) 18 bytes
{⌊#/#2⌋,Mod@##}⌋@Mod@##&
Only marginallyMinor abuse of the flexible output rules: the result is given as div[mod], which will remain unevaluated. The individual numbers can be extracted with result[[0]] and result[[1]].
And hey, it's only one byte longer than the ridiculously named built-in QuotientRemainder.
Mathematica, actually has a neat way to apply multiple functions to the same input, but it's three bytes longer:
Through@*{Quotient,Mod}
Mathematica, 20 bytes
{⌊#/#2⌋,Mod@##}&
Only marginally longer than the ridiculously named built-in QuotientRemainder.
Mathematica, actually has a neat way to apply multiple functions to the same input, but it's three bytes longer:
Through@*{Quotient,Mod}
Mathematica, (削除) 20 (削除ここまで) 18 bytes
⌊#/#2⌋@Mod@##&
Minor abuse of the flexible output rules: the result is given as div[mod], which will remain unevaluated. The individual numbers can be extracted with result[[0]] and result[[1]].
And hey, it's only one byte longer than the ridiculously named built-in QuotientRemainder.
Mathematica, actually has a neat way to apply multiple functions to the same input, but it's three bytes longer:
Through@*{Quotient,Mod}
Mathematica, 20 bytes
{⌊#/#2⌋,Mod@##}&
Only marginally longer than the ridiculously named built-in QuotientRemainder.
Mathematica, actually has a neat way to apply multiple functions to the same input, but it's three bytes longer:
Through@*{Quotient,Mod}