We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f504d commit 7b7fa4cCopy full SHA for 7b7fa4c
src/main/java/g3201_3300/s3273_minimum_amount_of_damage_dealt_to_bob/Solution.java
@@ -21,13 +21,10 @@ private class Pair implements Comparable<Pair> {
21
22
@Override
23
public int compareTo(Pair p) {
24
-
25
int thisHits = (int) Math.ceil((double) this.health / power);
26
int otherHits = (int) Math.ceil((double) p.health / power);
27
28
double thisTotalDamage = this.damage * 1.0 / thisHits;
29
double otherTotalDamage = p.damage * 1.0 / otherHits;
30
31
return Double.compare(otherTotalDamage, thisTotalDamage);
32
}
33
0 commit comments