ereinion icon

SalesAnalyzer

ereinion | PRO | 09/17/18 08:23:50 PM UTC | 0 ⭐ | 316 👁️ | Never ⏰ | []
JavaScript |

530 B

|

None

|

0 👍

/

0 👎

void write_big_sales(int limit) {
    string[int] shopLog = get_shop_log();
    matcher meat_gain;
    string pattern = "for (\\d+) Meat";
    int meat;
    
    foreach i in shopLog {
        meat_gain = create_matcher(pattern, shopLog[i]);
        if (find(meat_gain)) {
            meat = to_int(group(meat_gain, 1));
            if (meat >= limit) {
                print_html("<font color=0000FF>" +  i + " - " + shopLog[i] + "</font>");
            }
        }
    }
}
 
void main() {
    write_big_sales(500000);
}

Comments