int percent(String[] items) throws Exception {
		if(items == null || items.length == 0 || items.length > 50) {
			throw new Exception("items' length must between 1 and 50.");
		}
		
		int len = items.length,
			i = 0;
		double totalPrices = 0,
			   totalCosts = 0;
		String item;
		Matcher m;
		
		for(; i < len; i++) {
			item = items[i];
			if(item.length() != 13) throw new Exception("item's item must be 13 characters length.");
			m = p.matcher(item);
			if(!m.matches()) throw new Exception("item's item must be formatted as \"nnn.nn nnn.nn\".");
			totalPrices += Double.parseDouble(m.group(1));
			totalCosts += Double.parseDouble(m.group(2));
		}
		if(totalPrices == 0) throw new Exception("total price must be greater than 0.");
		if(totalPrices <= totalCosts) throw new Exception("total price must be greater than total cost.");
		return (int)Math.floor((totalPrices - totalCosts) / totalPrices * 100);
	}