Re:Solving 100 Bushels Using Matrix Factorization
by lupire on Wednesday October 02, 2024 @06:52PM
(#41725668)
Your code also has a bug, which would affect the result in some variations of the problem with different parameters, but fortunately does not affect this specific version. You also used 100.
Re:Solving 100 Bushels Using Matrix Factorization
by Etherlord87 on Saturday October 05, 2024 @03:09PM
(#41752146)
The code wasn't written for other parameters, so it doesn't have a bug.
Otherwise OP made an error in using range(0, 100) instead of range(0, 101), but even here you could pedantically point out "how do you know the numbers can't be negative or over 100? You're not supposed to think too much when brute-forcing!" - well you have to do some minimal thinking always :P
Also notice my code is actually simpler.