I’m attempting an implementation in Java, and have run into (what appears to be) multiple instances of precision-rounding issues. This is my first contest entry, so forgive me if I’m missing something obvious in the description, but I don’t see anything that says which formulas I should be using, and what level of precision (float vs double). The only formula mentioned is the “Euclidean distance formula.”

Basically, most of my final Integer calculations are plagued by off-by-one values. I’ve read and reread when and where I should be using Math.round vs Math.floor, anyone else experiencing this?