Skip to content

Commit 55c104b

Browse files
authored
fix 258 interactor (#97)
1 parent 611119c commit 55c104b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

algorithmic/problems/258/interactor.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ int main(int argc, char* argv[]) {
156156

157157
// Calculate raw ratio
158158
double ratio = numerator / denominator;
159+
ratio = max(0.0, ratio);
159160
double calculated_score = ratio * ratio;
160161

161162
if (solved) {

0 commit comments

Comments
 (0)