/*
Place a bet
*/
Using System;
Using System. Collections;
Namespace XXX
{
Class MainClass
{
Public static void Main (string [] args)
{
Double N = 1;
Int baseline = 1;
Int count = 30; // The total number of bets
DoubleN. Compute (N, baseline, count );
For (int j = 0; j <DoubleN. tmp. Count; j ++)
{
Console. WriteLine ("{0} \ t: {1} \ t =>", j, DoubleN. tmp [j]);
}
}
}
Class DoubleN
{
Public static arraylist TMP = new arraylist ();
Public static void compute (double N, int X, int I)
{
TMP. Add (N );
TMP. Add (x * n );
For (Int J = 2; j <I + 1; j ++)
{
Next (X );
}
}
Static double next (int x)
{
Double tmpresult = 0;
For (Int J = 0; j <TMP. Count; j ++)
{
Tmpresult + = (double) TMP [J];
}
Tmpresult = tmpresult * X;
If (! TMP. Contains (tmpresult ))
{
Tmp. Add (tmpResult );
}
// Console. WriteLine ("{0}", tmpResult );
Return tmpResult;
}
}
}
------
Double N = 1;
Int baseline = 1;
Int count = 30; // The total number of bets
0: 1 =>
1: 1 =>
2: 2 =>
3: 4 =>
4: 8 ==>
5: 16 =>
6: 32 =>
7: 64 ==>
8: 128 =>
9: 256 =>
10: 512 =>
11: 1024 =>
12: 2048 =>
13: 4096 =>
14: 8192 =>
15: 16384 =>
16: 32768 =>
17: 65536 =>
18: 131072 =>
19: 262144 =>
20: 524288 ==>
21: 1048576 =>
22: 2097152 =>
23: 4194304 =>
24: 8388608 ==>
25: 16777216 =>
26: 33554432 =>
27: 67108864 =>
28: 134217728 =>
29: 268435456 =>
30: 536870912 =>
Double N = 2;
Int baseline = 2;
Int count = 30;
0: 2 =>
1: 4 =>
2: 12 =>
3: 36 =>
4: 108 =>
5: 324 =>
6: 972 =>
7: 2916 =>
8: 8748 =>
9: 26244 =>
10: 78732 =>
11: 236196 =>
12: 708588 =>
13: 2125764 =>
14: 6377292 =>
15: 19131876 =>
16: 57395628 =>
17: 172186884 =>
18: 516560652 =>
19: 1549681956 =>
20: 4649045868 ==>
21: 13947137604 =>
22: 41841412812 =>
23: 125524238436 =>
24: 376572715308 ==>
25: 1129718145924 =>
26: 3389154437772 =>
27: 10167463313316 =>
28: 30502389939948 =>
29: 91507169819844 =>
30: 274521509459532 =>