Programmer from Birmingham, AL, currently employed as a full stack web developer for EBSCO (working primarily with Magento), and learning Rust in my free time.
Programmer from Birmingham, AL, currently employed as a full stack web developer for EBSCO (working primarily with Magento), and learning Rust in my free time.
Hm, you're right. It looks like I didn't test it thoroughly enough yesterday, and the tests I did came back with the right answers for the wrong reason. I'm trying to get better at solving math problems so I'll look more into this when I'm off work.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you, that's a good catch - I fixed this by replacing
floor()
withround()
.I'm still not sure it's correct.
cola(9, array(1, 2))
returns 2 instead of 1.Hm, you're right. It looks like I didn't test it thoroughly enough yesterday, and the tests I did came back with the right answers for the wrong reason. I'm trying to get better at solving math problems so I'll look more into this when I'm off work.