From 622a5e233b9935dd95dc7b1bca8d2afd08b15376 Mon Sep 17 00:00:00 2001 From: fusunx <1102654482@qq.com> Date: Mon, 7 Jun 2021 21:14:42 +0800 Subject: [PATCH] =?UTF-8?q?0860.=E6=9F=A0=E6=AA=AC=E6=B0=B4=E6=89=BE?= =?UTF-8?q?=E9=9B=B6.md=20Javascript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- problems/0860.柠檬水找零.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/problems/0860.柠檬水找零.md b/problems/0860.柠檬水找零.md index 1a5634b5..a18c008d 100644 --- a/problems/0860.柠檬水找零.md +++ b/problems/0860.柠檬水找零.md @@ -189,7 +189,6 @@ Javascript: var lemonadeChange = function(bills) { let fiveCount = 0 let tenCount = 0 - let twentyCount = 0 for(let i = 0; i < bills.length; i++) { let bill = bills[i] @@ -204,11 +203,9 @@ var lemonadeChange = function(bills) { } } else { if(tenCount > 0 && fiveCount > 0) { - twentyCount += 1 tenCount -= 1 fiveCount -= 1 } else if(fiveCount >= 3) { - twentyCount += 1 fiveCount -= 3 } else { return false