Skip to content

Commit 776c69d

Browse files
update 1518
1 parent 4fd476e commit 776c69d

File tree

1 file changed

+3
-3
lines changed
  • src/main/java/com/fishercoder/solutions/secondthousand

1 file changed

+3
-3
lines changed

src/main/java/com/fishercoder/solutions/secondthousand/_1518.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
public class _1518 {
44
public static class Solution1 {
55
public int numWaterBottles(int numBottles, int numExchange) {
6-
int drunk = numBottles;
6+
int drank = numBottles;
77
int emptyBottles = numBottles;
88
while (emptyBottles >= numExchange) {
99
int exchangedBottles = emptyBottles / numExchange;
10-
drunk += exchangedBottles;
10+
drank += exchangedBottles;
1111
int unUsedEmptyBottles = emptyBottles % numExchange;
1212
emptyBottles = exchangedBottles + unUsedEmptyBottles;
1313
}
14-
return drunk;
14+
return drank;
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)