Mathematica, (削除) 32 (削除ここまで) 31 bytes
Thanks to Martin Ender for calming the code down to the tune of 1 byte!
0@#2//.a_@b_/;b>=#:>(a+1)[b-#]&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, (削除) 32 (削除ここまで) 31 bytes
Thanks to Martin Ender for calming the code down to the tune of 1 byte!
0@#2//.a_@b_/;b>=#:>(a+1)[b-#]&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, (削除) 32 (削除ここまで) 31 bytes
Thanks to Martin Ender for calming the code down to the tune of 1 byte!
0@#2//.a_@b_/;b>=#:>(a+1)[b-#]&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, 32(削除) 32 (削除ここまで) 31 bytes
Thanks to Martin Ender for calming the code down to the tune of 1 byte!
0@#2//.a_@b_/;b>=#:>(a+1)@(b[b-#)&#]&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, 32 bytes
0@#2//.a_@b_/;b>=#:>(a+1)@(b-#)&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, (削除) 32 (削除ここまで) 31 bytes
Thanks to Martin Ender for calming the code down to the tune of 1 byte!
0@#2//.a_@b_/;b>=#:>(a+1)[b-#]&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].
Mathematica, 32 bytes
0@#2//.a_@b_/;b>=#:>(a+1)@(b-#)&
Just to mess with the language. Pure function taking the two positive integer arguments in the opposite (counterintuitive) order, and returning the quotient q and the remainder r in the same style, q[r], as in Martin Ender's Mathematica answer. While that answer is shorter, this one is ... more contrary? It implements repeated subtraction on expressions of the form a[b].