860. Lemonade Change
原本想蝦雞巴亂寫很複雜的程式碼,後來想想還是簡單比較好
class Solution {
public:
bool lemonadeChange(vector<int>& bills) {
int bill5 = 0;
int bill10 = 0;
// int bill20 = 0;
for(int bill : bills) {
int change = bill - 5;
if(change == 0) {
bill5++;
} else if(change == 5) {
if(bill5 ==0) {
return false;
}
bill5