We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 611119c commit 55c104bCopy full SHA for 55c104b
1 file changed
algorithmic/problems/258/interactor.cc
@@ -156,6 +156,7 @@ int main(int argc, char* argv[]) {
156
157
// Calculate raw ratio
158
double ratio = numerator / denominator;
159
+ ratio = max(0.0, ratio);
160
double calculated_score = ratio * ratio;
161
162
if (solved) {
0 commit comments