---
# System prepended metadata

title: Untitled

---

20210217

---

```javascript=
var i = 0,
    j = 0,
    k = 0,
    l = 0,
    m = 0,
    flag = 0,
    choose = 5
var tmp = 0.0,
    ans = 0.0,
    target = 3530100.0
var array1 = [2.7, 2.05, 1.4, 4.5, 2.05, 1.5, 1.28, 2.7, 3.75, 1.12, 1.8, 1.7]
var array2 = [2.8, 2.05, 1.4, 4.5, 1.95, 1.55, 1.25, 2.85, 3.5, 1.15, 1.8, 1.7]
var array3 = [2, 2.85, 4.25, 1.45, 1.95, 1.55, 1.25, 2.85, 3.5, 1.15, 1.8, 1.7]
var array4 = [2, 2.9, 4.25, 1.45, 1.9, 1.6, 1.22, 3, 3.3, 1.18, 1.8, 1.7]
var array5 = [2.55, 2.1, 1.4, 4.5, 1.85, 1.65, 1.2, 3.1, 3.3, 1.18, 1.8, 1.7]

if (choose === 5) {
    for (i = 0; i < array1.length; i++) {
        for (j = 0; j < array2.length; j++) {
            for (k = 0; k < array3.length; k++) {
                for (l = 0; l < array4.length; l++) {
                    for (m = 0; m < array5.length; m++) {
                        tmp = array1[i] * array2[j] * array3[k] * array4[l] * array5[m]
                        ans = Math.round(100000 * tmp);
                        if (ans == target || ans == target - 1 || ans == target + 1) {
                            console.log("i == " + i + ", array1[i] == " + array1[i])
                            console.log("j == " + j + ", array2[j] == " + array2[j])
                            console.log("k == " + k + ", array3[k] == " + array3[k])
                            console.log("l == " + l + ", array4[l] == " + array4[l])
                            console.log("m == " + m + ", array5[m] == " + array5[m])
                            flag += 1
                        }
                    }
                }
            }
        }
    }
} else {
    for (i = 0; i < array1.length; i++) {
        for (j = 0; j < array2.length; j++) {
            for (k = 0; k < array3.length; k++) {
                for (l = 0; l < array4.length; l++) {
                    tmp = array1[i] * array2[j] * array3[k] * array4[l]
                    ans = Math.round(100000 * tmp);
                    if (ans == target || ans == target - 1 || ans == target + 1) {
                        console.log("i == " + i + ", array1[i] == " + array1[i])
                        console.log("j == " + j + ", array2[j] == " + array2[j])
                        console.log("k == " + k + ", array3[k] == " + array3[k])
                        console.log("l == " + l + ", array4[l] == " + array4[l])
                        flag += 1
                    }
                }
            }
        }
    }
}
console.log("總共有 " + flag + " 種")
```

---

```java=

public class Main {
	public static void main(String[] args) {
		int VAR = 12, choose = 5;
		// 1. 主客不讓分(主)
		// 2. 主客不讓分(客)
		// 3. 主客讓分(主)
		// 4. 主客讓分(客)
		// 5. 大小總分(大 2.5)
		// 6. 大小總分(小 2.5)
		// 7. 大小總分(大 1.5)
		// 8. 大小總分(小 1.5)
		// 9. 大小總分(大 3.5)
		// 10. 大小總分(小 3.5)
		// 11. 單雙總分(單)
		// 12. 單雙總分(雙)
		double[] match1 = { 2.7, 2.05, 1.4, 4.5, 2.05, 1.5, 1.28, 2.7, 3.75, 1.12, 1.8, 1.7 };
		double[] match2 = { 2.8, 2.05, 1.4, 4.5, 1.95, 1.55, 1.25, 2.85, 3.5, 1.15, 1.8, 1.7 };
		double[] match3 = { 2, 2.85, 4.25, 1.45, 1.95, 1.55, 1.25, 2.85, 3.5, 1.15, 1.8, 1.7 };
		double[] match4 = { 2, 2.9, 4.25, 1.45, 1.9, 1.6, 1.22, 3, 3.3, 1.18, 1.8, 1.7 };
		double[] match5 = { 2.55, 2.1, 1.4, 4.5, 1.85, 1.65, 1.2, 3.1, 3.3, 1.18, 1.8, 1.7 };
		double tmp = 0.00, ans = 0.0;
		int target = 3530100;
		int flag = 0;

		if (choose == 5) {
			// 1
			for (int i = 0; i < VAR; i++) {
				// 2
				for (int j = 0; j < VAR; j++) {
					// 3
					for (int k = 0; k < VAR; k++) {
						// 4
						for (int l = 0; l < VAR; l++) {
							// 5
							for (int m = 0; m < VAR; m++) {
								tmp = match1[i] * match2[j] * match3[k] * match4[l] * match5[m];
								ans = Math.round(100000 * tmp);
								if (ans == target || ans == target - 1 || ans == target + 1) {
									System.out.println("i == " + i + ", match1[i] == " + match1[i]);
									System.out.println("j == " + j + ", match2[j] == " + match2[j]);
									System.out.println("k == " + k + ", match3[k] == " + match3[k]);
									System.out.println("l == " + l + ", match4[l] == " + match4[l]);
									System.out.println("m == " + m + ", match5[m] == " + match5[m]);
									System.out.println("ans == " + ans + ", target == " + target);
									flag += 1;
								}
							}
						}
					}
				}
			}
		} else {
			// 1
			for (int i = 0; i < VAR; i++) {
				// 2
				for (int j = 0; j < VAR; j++) {
					// 3
					for (int k = 0; k < VAR; k++) {
						// 4
						for (int l = 0; l < VAR; l++) {
							tmp = match1[i] * match2[j] * match3[k] * match4[l];
							ans = Math.round(100000 * tmp);
							if (ans == target || ans == target - 1 || ans == target + 1) {
								System.out.println("i == " + i + ", match1[i] == " + match1[i]);
								System.out.println("j == " + j + ", match2[j] == " + match2[j]);
								System.out.println("k == " + k + ", match3[k] == " + match3[k]);
								System.out.println("l == " + l + ", match4[l] == " + match4[l]);
								System.out.println("ans == " + ans + ", target == " + target);
								flag += 1;
							}
						}
					}
				}
			}
		}
		System.out.println("總共" + flag + "種");
	}

	/*
	 * (non-Java-doc)
	 * 
	 * @see java.lang.Object#Object()
	 */
	public Main() {
		super();
	}

}
```

---

end!

---