Skip to content

Commit 66860bb

Browse files
fix(cpp): fix solution for lc No.860 (#5007)
1 parent c59244e commit 66860bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

solution/0800-0899/0860.Lemonade Change/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class Solution {
141141
class Solution {
142142
public:
143143
bool lemonadeChange(vector<int>& bills) {
144-
int five = 0, ten = 10;
144+
int five = 0, ten = 0;
145145
for (int v : bills) {
146146
if (v == 5) {
147147
++five;

solution/0800-0899/0860.Lemonade Change/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class Solution {
126126
class Solution {
127127
public:
128128
bool lemonadeChange(vector<int>& bills) {
129-
int five = 0, ten = 10;
129+
int five = 0, ten = 0;
130130
for (int v : bills) {
131131
if (v == 5) {
132132
++five;

solution/0800-0899/0860.Lemonade Change/Solution.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class Solution {
22
public:
33
bool lemonadeChange(vector<int>& bills) {
4-
int five = 0, ten = 10;
4+
int five = 0, ten = 0;
55
for (int v : bills) {
66
if (v == 5) {
77
++five;
@@ -22,4 +22,4 @@ class Solution {
2222
}
2323
return true;
2424
}
25-
};
25+
};

0 commit comments

Comments
 (0)