1. 程式人生 > >抽獎砍價之類以均值為基礎的波動演算法 demo版本

抽獎砍價之類以均值為基礎的波動演算法 demo版本

<?php

/*
砍價小程式生成 以平均值為波動的隨機砍價演算法 此演算法有點low  
但是可以實現基本上 以平均值為波動的 目前只能滿足 平均值小於10和小於100的演算法實現
如果基數小那麼可以有更好的演算法 因為公司要求500元得價格 大約300-400人才能獲得。。。所以如果波動很大 那麼會有更多的重複值
只做一個參考 demo 用吧
最後求得陣列 總價格會有偏差 但是基本上多出0.1來也可以忽略不計
程式碼裡得註釋可以忽略 基本上沒啥用 有的也沒刪除。。。
*/
<?php


function suanfa($money,$people,&$arr,&$nowmoney){


	$sheng_money = 0;
	$sheng_people = 0;
	$num=0;

	//先求平均值
	//
	$pinjun = round($money/$people,2);
	// echo $pinjun;exit;
	$i=0;
	$j=0;
	
	if($pinjun<10){

		$pinjun_num = $pinjun*100;
		$jia = 0.01;
		$jian=0.01;
		if($people>($pinjun_num*2)){

			for($i=0;$i<$pinjun_num;$i++){
					$arr[$i] = $pinjun+$jia;
					$jia=$jia+0.01;
			}

			for($i=0;$i<($pinjun_num-1);$i++){
					$arr[$i+$pinjun_num]=round(($pinjun-$jian)*100,2)/100;
					$jian=$jian+0.01;

			}
			//如果大於他 會有剩下的值 
			$count_num = count($arr);
			$sheng_num = $people-$count_num;
			//echo $sheng_num;//151 之前是249; 
			//或許不用
			//求一下剩餘的總價
			$nowmoney = array_sum($arr);

			$sheng_money = $money-$nowmoney;

			for($i=$count_num;$i<$people;$i++){

					//最後一個
					if($i==$people-1){
						$arr[$i] = round($money-array_sum($arr),2);
						if($arr[$i]<0.01){
							$arr[$i] = 0.01;
						}
					}else{

						if($i==$count_num){
							$arr[$i] =  round(round(($sheng_money/$sheng_num*1.5)*100,2)/100,2);
							if($arr[$i]<0.01){
								$arr[$i] = 0.01;
							}
							$hai_shengxia_money = $sheng_money-$arr[$i];
							$sheng_num--;
						}else{

							$arr[$i] =  round(round(($hai_shengxia_money/$sheng_num*1.5)*100,2)/100,2);
							if($arr[$i]<0.01){
								$arr[$i] = 0.01;
							}
							$hai_shengxia_money = $hai_shengxia_money-$arr[$i];
							$sheng_num--;
						}

					}

			}
		

			if(array_sum($arr)<$money){

				$arr[0] += round(($money-array_sum($arr) )*100,2)/100; 
			}
					

		}else{

			//$pingjun=2.5;

			for($i=0;$i<($people/2);$i++){
					$arr[$i] = $pinjun+$jia;
					$jia=$jia+0.01;
			}

			for($i=0;$i<($people/2);$i++){
					$arr[$i+$people/2]=round(($pinjun-$jian)*100,2)/100;
					$jian=$jian+0.01;

			}

			if(array_sum($arr)<$money){

				$arr[0] += round(($money-array_sum($arr) )*100,2)/100; 
			}
					
		}


	}elseif($pinjun<100){

		$pinjun_num = $pinjun*100;
		$jia = 0.1;
		$jian=0.1;
		if($people>($pinjun_num*2)){

			for($i=0;$i<$pinjun_num;$i++){
					$arr[$i] = $pinjun+$jia;
					$jia=$jia+0.1;
			}

			for($i=0;$i<($pinjun_num-1);$i++){
					$arr[$i+$pinjun_num]=round(($pinjun-$jian)*100,2)/100;
					$jian=$jian+0.1;

			}
			//如果大於他 會有剩下的值 
			$count_num = count($arr);

			$sheng_num = $people-$count_num;
			//echo $sheng_num;//151 之前是249; 
			//或許不用
			//求一下剩餘的總價
			$nowmoney = array_sum($arr);

			$sheng_money = $money-$nowmoney;

			for($i=$count_num;$i<$people;$i++){

					//最後一個
					if($i==$people-1){
						$arr[$i] = round($money-array_sum($arr),2);
						if($arr[$i]<0.1){
							$arr[$i] = 0.1;
						}
					}else{

						if($i==$count_num){
							$arr[$i] =  round(round(($sheng_money/$sheng_num*1.5)*100,2)/100,2);
							if($arr[$i]<0.1){
								$arr[$i] = 0.1;
							}
							$hai_shengxia_money = $sheng_money-$arr[$i];
							$sheng_num--;
						}else{

							$arr[$i] =  round(round(($hai_shengxia_money/$sheng_num*1.5)*100,2)/100,2);
							if($arr[$i]<0.1){
								$arr[$i] = 0.1;
							}
							$hai_shengxia_money = $hai_shengxia_money-$arr[$i];
							$sheng_num--;
						}

					}

			}
		
			if(array_sum($arr)<$money){

				$arr[0] += round(($money-array_sum($arr) )*100,2)/100; 
			}
					


		}else{

			//$pingjun=2.5;

			for($i=0;$i<($people/2);$i++){
					$arr[$i] = round(($pinjun+$jian)*100,2)/100;//$pinjun+$jia;
					$jia=$jia+0.1;
			}

			for($i=0;$i<($people/2);$i++){
					$arr[$i+$people/2]=round(($pinjun-$jian)*100,2)/100;
					$jian=$jian+0.1;

			}


			if(array_sum($arr)<$money){

				$arr[0] += round(($money-array_sum($arr) )*100,2)/100; 
			}
						
		}

	}
}

$money = 199;
$people = 5;
$arr = array();
$nowmoney = 0;
suanfa($money,$people,$arr,$nowmoney);


echo array_sum($arr);


shuffle($arr);

//print_r($arr);exit;

echo(json_encode($arr));exit;

/*
ALTER TABLE `hhs_activity_data`
ADD COLUMN `probability`  text NOT NULL AFTER `ext3`;

還得改表的欄位 不能用int

總價格500  人數30
陣列最後的總價500.1
Array
(
    [0] => 16.77
    [1] => 16.87
    [2] => 16.97
    [3] => 17.07
    [4] => 17.17
    [5] => 17.27
    [6] => 17.37
    [7] => 17.47
    [8] => 17.57
    [9] => 17.67
    [10] => 17.77
    [11] => 17.87
    [12] => 17.97
    [13] => 18.07
    [14] => 18.17
    [15] => 16.57
    [16] => 16.47
    [17] => 16.37
    [18] => 16.27
    [19] => 16.17
    [20] => 16.07
    [21] => 15.97
    [22] => 15.87
    [23] => 15.77
    [24] => 15.67
    [25] => 15.57
    [26] => 15.47
    [27] => 15.37
    [28] => 15.27
    [29] => 15.17
)

這個是總價格500 人數400
最後求得的陣列總價500
Array
(
    [0] => 1.26
    [1] => 1.27
    [2] => 1.28
    [3] => 1.29
    [4] => 1.3
    [5] => 1.31
    [6] => 1.32
    [7] => 1.33
    [8] => 1.34
    [9] => 1.35
    [10] => 1.36
    [11] => 1.37
    [12] => 1.38
    [13] => 1.39
    [14] => 1.4
    [15] => 1.41
    [16] => 1.42
    [17] => 1.43
    [18] => 1.44
    [19] => 1.45
    [20] => 1.46
    [21] => 1.47
    [22] => 1.48
    [23] => 1.49
    [24] => 1.5
    [25] => 1.51
    [26] => 1.52
    [27] => 1.53
    [28] => 1.54
    [29] => 1.55
    [30] => 1.56
    [31] => 1.57
    [32] => 1.58
    [33] => 1.59
    [34] => 1.6
    [35] => 1.61
    [36] => 1.62
    [37] => 1.63
    [38] => 1.64
    [39] => 1.65
    [40] => 1.66
    [41] => 1.67
    [42] => 1.68
    [43] => 1.69
    [44] => 1.7
    [45] => 1.71
    [46] => 1.72
    [47] => 1.73
    [48] => 1.74
    [49] => 1.75
    [50] => 1.76
    [51] => 1.77
    [52] => 1.78
    [53] => 1.79
    [54] => 1.8
    [55] => 1.81
    [56] => 1.82
    [57] => 1.83
    [58] => 1.84
    [59] => 1.85
    [60] => 1.86
    [61] => 1.87
    [62] => 1.88
    [63] => 1.89
    [64] => 1.9
    [65] => 1.91
    [66] => 1.92
    [67] => 1.93
    [68] => 1.94
    [69] => 1.95
    [70] => 1.96
    [71] => 1.97
    [72] => 1.98
    [73] => 1.99
    [74] => 2
    [75] => 2.01
    [76] => 2.02
    [77] => 2.03
    [78] => 2.04
    [79] => 2.05
    [80] => 2.06
    [81] => 2.07
    [82] => 2.08
    [83] => 2.09
    [84] => 2.1
    [85] => 2.11
    [86] => 2.12
    [87] => 2.13
    [88] => 2.14
    [89] => 2.15
    [90] => 2.16
    [91] => 2.17
    [92] => 2.18
    [93] => 2.19
    [94] => 2.2
    [95] => 2.21
    [96] => 2.22
    [97] => 2.23
    [98] => 2.24
    [99] => 2.25
    [100] => 2.26
    [101] => 2.27
    [102] => 2.28
    [103] => 2.29
    [104] => 2.3
    [105] => 2.31
    [106] => 2.32
    [107] => 2.33
    [108] => 2.34
    [109] => 2.35
    [110] => 2.36
    [111] => 2.37
    [112] => 2.38
    [113] => 2.39
    [114] => 2.4
    [115] => 2.41
    [116] => 2.42
    [117] => 2.43
    [118] => 2.44
    [119] => 2.45
    [120] => 2.46
    [121] => 2.47
    [122] => 2.48
    [123] => 2.49
    [124] => 2.5
    [125] => 1.24
    [126] => 1.23
    [127] => 1.22
    [128] => 1.21
    [129] => 1.2
    [130] => 1.19
    [131] => 1.18
    [132] => 1.17
    [133] => 1.16
    [134] => 1.15
    [135] => 1.14
    [136] => 1.13
    [137] => 1.12
    [138] => 1.11
    [139] => 1.1
    [140] => 1.09
    [141] => 1.08
    [142] => 1.07
    [143] => 1.06
    [144] => 1.05
    [145] => 1.04
    [146] => 1.03
    [147] => 1.02
    [148] => 1.01
    [149] => 1
    [150] => 0.99
    [151] => 0.98
    [152] => 0.97
    [153] => 0.96
    [154] => 0.95
    [155] => 0.94
    [156] => 0.93
    [157] => 0.92
    [158] => 0.91
    [159] => 0.9
    [160] => 0.89
    [161] => 0.88
    [162] => 0.87
    [163] => 0.86
    [164] => 0.85
    [165] => 0.84
    [166] => 0.83
    [167] => 0.82
    [168] => 0.81
    [169] => 0.8
    [170] => 0.79
    [171] => 0.78
    [172] => 0.77
    [173] => 0.76
    [174] => 0.75
    [175] => 0.74
    [176] => 0.73
    [177] => 0.72
    [178] => 0.71
    [179] => 0.7
    [180] => 0.69
    [181] => 0.68
    [182] => 0.67
    [183] => 0.66
    [184] => 0.65
    [185] => 0.64
    [186] => 0.63
    [187] => 0.62
    [188] => 0.61
    [189] => 0.6
    [190] => 0.59
    [191] => 0.58
    [192] => 0.57
    [193] => 0.56
    [194] => 0.55
    [195] => 0.54
    [196] => 0.53
    [197] => 0.52
    [198] => 0.51
    [199] => 0.5
    [200] => 0.49
    [201] => 0.48
    [202] => 0.47
    [203] => 0.46
    [204] => 0.45
    [205] => 0.44
    [206] => 0.43
    [207] => 0.42
    [208] => 0.41
    [209] => 0.4
    [210] => 0.39
    [211] => 0.38
    [212] => 0.37
    [213] => 0.36
    [214] => 0.35
    [215] => 0.34
    [216] => 0.33
    [217] => 0.32
    [218] => 0.31
    [219] => 0.3
    [220] => 0.29
    [221] => 0.28
    [222] => 0.27
    [223] => 0.26
    [224] => 0.25
    [225] => 0.24
    [226] => 0.23
    [227] => 0.22
    [228] => 0.21
    [229] => 0.2
    [230] => 0.19
    [231] => 0.18
    [232] => 0.17
    [233] => 0.16
    [234] => 0.15
    [235] => 0.14
    [236] => 0.13
    [237] => 0.12
    [238] => 0.11
    [239] => 0.1
    [240] => 0.09
    [241] => 0.08
    [242] => 0.07
    [243] => 0.06
    [244] => 0.05
    [245] => 0.04
    [246] => 0.03
    [247] => 0.02
    [248] => 0.01
    [249] => 1.86
    [250] => 1.86
    [251] => 1.85
    [252] => 1.84
    [253] => 1.84
    [254] => 1.83
    [255] => 1.83
    [256] => 1.82
    [257] => 1.81
    [258] => 1.81
    [259] => 1.8
    [260] => 1.79
    [261] => 1.79
    [262] => 1.78
    [263] => 1.77
    [264] => 1.77
    [265] => 1.76
    [266] => 1.75
    [267] => 1.75
    [268] => 1.74
    [269] => 1.73
    [270] => 1.73
    [271] => 1.72
    [272] => 1.71
    [273] => 1.71
    [274] => 1.7
    [275] => 1.69
    [276] => 1.69
    [277] => 1.68
    [278] => 1.67
    [279] => 1.67
    [280] => 1.66
    [281] => 1.65
    [282] => 1.65
    [283] => 1.64
    [284] => 1.63
    [285] => 1.62
    [286] => 1.62
    [287] => 1.61
    [288] => 1.6
    [289] => 1.6
    [290] => 1.59
    [291] => 1.58
    [292] => 1.57
    [293] => 1.57
    [294] => 1.56
    [295] => 1.55
    [296] => 1.54
    [297] => 1.54
    [298] => 1.53
    [299] => 1.52
    [300] => 1.51
    [301] => 1.51
    [302] => 1.5
    [303] => 1.49
    [304] => 1.48
    [305] => 1.48
    [306] => 1.47
    [307] => 1.46
    [308] => 1.45
    [309] => 1.44
    [310] => 1.44
    [311] => 1.43
    [312] => 1.42
    [313] => 1.41
    [314] => 1.4
    [315] => 1.39
    [316] => 1.39
    [317] => 1.38
    [318] => 1.37
    [319] => 1.36
    [320] => 1.35
    [321] => 1.34
    [322] => 1.34
    [323] => 1.33
    [324] => 1.32
    [325] => 1.31
    [326] => 1.3
    [327] => 1.29
    [328] => 1.28
    [329] => 1.27
    [330] => 1.26
    [331] => 1.26
    [332] => 1.25
    [333] => 1.24
    [334] => 1.23
    [335] => 1.22
    [336] => 1.21
    [337] => 1.2
    [338] => 1.19
    [339] => 1.18
    [340] => 1.17
    [341] => 1.16
    [342] => 1.15
    [343] => 1.14
    [344] => 1.13
    [345] => 1.12
    [346] => 1.11
    [347] => 1.1
    [348] => 1.09
    [349] => 1.08
    [350] => 1.07
    [351] => 1.05
    [352] => 1.04
    [353] => 1.03
    [354] => 1.02
    [355] => 1.01
    [356] => 1
    [357] => 0.99
    [358] => 0.98
    [359] => 0.96
    [360] => 0.95
    [361] => 0.94
    [362] => 0.93
    [363] => 0.91
    [364] => 0.9
    [365] => 0.89
    [366] => 0.88
    [367] => 0.86
    [368] => 0.85
    [369] => 0.84
    [370] => 0.82
    [371] => 0.81
    [372] => 0.79
    [373] => 0.78
    [374] => 0.76
    [375] => 0.75
    [376] => 0.73
    [377] => 0.72
    [378] => 0.7
    [379] => 0.68
    [380] => 0.67
    [381] => 0.65
    [382] => 0.63
    [383] => 0.61
    [384] => 0.59
    [385] => 0.57
    [386] => 0.55
    [387] => 0.53
    [388] => 0.51
    [389] => 0.49
    [390] => 0.46
    [391] => 0.44
    [392] => 0.41
    [393] => 0.38
    [394] => 0.35
    [395] => 0.31
    [396] => 0.27
    [397] => 0.23
    [398] => 0.17
    [399] => 0.06
)



價格500 人數1000
陣列總價格500
Array
(
    [0] => 0.51
    [1] => 0.52
    [2] => 0.53
    [3] => 0.54
    [4] => 0.55
    [5] => 0.56
    [6] => 0.57
    [7] => 0.58
    [8] => 0.59
    [9] => 0.6
    [10] => 0.61
    [11] => 0.62
    [12] => 0.63
    [13] => 0.64
    [14] => 0.65
    [15] => 0.66
    [16] => 0.67
    [17] => 0.68
    [18] => 0.69
    [19] => 0.7
    [20] => 0.71
    [21] => 0.72
    [22] => 0.73
    [23] => 0.74
    [24] => 0.75
    [25] => 0.76
    [26] => 0.77
    [27] => 0.78
    [28] => 0.79
    [29] => 0.8
    [30] => 0.81
    [31] => 0.82
    [32] => 0.83
    [33] => 0.84
    [34] => 0.85
    [35] => 0.86
    [36] => 0.87
    [37] => 0.88
    [38] => 0.89
    [39] => 0.9
    [40] => 0.91
    [41] => 0.92
    [42] => 0.93
    [43] => 0.94
    [44] => 0.95
    [45] => 0.96
    [46] => 0.97
    [47] => 0.98
    [48] => 0.99
    [49] => 1
    [50] => 0.49
    [51] => 0.48
    [52] => 0.47
    [53] => 0.46
    [54] => 0.45
    [55] => 0.44
    [56] => 0.43
    [57] => 0.42
    [58] => 0.41
    [59] => 0.4
    [60] => 0.39
    [61] => 0.38
    [62] => 0.37
    [63] => 0.36
    [64] => 0.35
    [65] => 0.34
    [66] => 0.33
    [67] => 0.32
    [68] => 0.31
    [69] => 0.3
    [70] => 0.29
    [71] => 0.28
    [72] => 0.27
    [73] => 0.26
    [74] => 0.25
    [75] => 0.24
    [76] => 0.23
    [77] => 0.22
    [78] => 0.21
    [79] => 0.2
    [80] => 0.19
    [81] => 0.18
    [82] => 0.17
    [83] => 0.16
    [84] => 0.15
    [85] => 0.14
    [86] => 0.13
    [87] => 0.12
    [88] => 0.11
    [89] => 0.1
    [90] => 0.09
    [91] => 0.08
    [92] => 0.07
    [93] => 0.06
    [94] => 0.05
    [95] => 0.04
    [96] => 0.03
    [97] => 0.02
    [98] => 0.01
    [99] => 0.75
    [100] => 0.75
    [101] => 0.75
    [102] => 0.75
    [103] => 0.75
    [104] => 0.75
    [105] => 0.75
    [106] => 0.75
    [107] => 0.75
    [108] => 0.75
    [109] => 0.74
    [110] => 0.74
    [111] => 0.74
    [112] => 0.74
    [113] => 0.74
    [114] => 0.74
    [115] => 0.74
    [116] => 0.74
    [117] => 0.74
    [118] => 0.74
    [119] => 0.74
    [120] => 0.74
    [121] => 0.74
    [122] => 0.74
    [123] => 0.74
    [124] => 0.74
    [125] => 0.74
    [126] => 0.74
    [127] => 0.74
    [128] => 0.74
    [129] => 0.74
    [130] => 0.74
    [131] => 0.74
    [132] => 0.74
    [133] => 0.73
    [134] => 0.73
    [135] => 0.73
    [136] => 0.73
    [137] => 0.73
    [138] => 0.73
    [139] => 0.73
    [140] => 0.73
    [141] => 0.73
    [142] => 0.73
    [143] => 0.73
    [144] => 0.73
    [145] => 0.73
    [146] => 0.73
    [147] => 0.73
    [148] => 0.73
    [149] => 0.73
    [150] => 0.73
    [151] => 0.73
    [152] => 0.73
    [153] => 0.73
    [154] => 0.73
    [155] => 0.73
    [156] => 0.73
    [157] => 0.72
    [158] => 0.72
    [159] => 0.72
    [160] => 0.72
    [161] => 0.72
    [162] => 0.72
    [163] => 0.72
    [164] => 0.72
    [165] => 0.72
    [166] => 0.72
    [167] => 0.72
    [168] => 0.72
    [169] => 0.72
    [170] => 0.72
    [171] => 0.72
    [172] => 0.72
    [173] => 0.72
    [174] => 0.72
    [175] => 0.72
    [176] => 0.72
    [177] => 0.72
    [178] => 0.72
    [179] => 0.72
    [180] => 0.71
    [181] => 0.71
    [182] => 0.71
    [183] => 0.71
    [184] => 0.71
    [185] => 0.71
    [186] => 0.71
    [187] => 0.71
    [188] => 0.71
    [189] => 0.71
    [190] => 0.71
    [191] => 0.71
    [192] => 0.71
    [193] => 0.71
    [194] => 0.71
    [195] => 0.71
    [196] => 0.71
    [197] => 0.71
    [198] => 0.71
    [199] => 0.71
    [200] => 0.71
    [201] => 0.71
    [202] => 0.71
    [203] => 0.7
    [204] => 0.7
    [205] => 0.7
    [206] => 0.7
    [207] => 0.7
    [208] => 0.7
    [209] => 0.7
    [210] => 0.7
    [211] => 0.7
    [212] => 0.7
    [213] => 0.7
    [214] => 0.7
    [215] => 0.7
    [216] => 0.7
    [217] => 0.7
    [218] => 0.7
    [219] => 0.7
    [220] => 0.7
    [221] => 0.7
    [222] => 0.7
    [223] => 0.7
    [224] => 0.7
    [225] => 0.69
    [226] => 0.69
    [227] => 0.69
    [228] => 0.69
    [229] => 0.69
    [230] => 0.69
    [231] => 0.69
    [232] => 0.69
    [233] => 0.69
    [234] => 0.69
    [235] => 0.69
    [236] => 0.69
    [237] => 0.69
    [238] => 0.69
    [239] => 0.69
    [240] => 0.69
    [241] => 0.69
    [242] => 0.69
    [243] => 0.69
    [244] => 0.69
    [245] => 0.69
    [246] => 0.69
    [247] => 0.68
    [248] => 0.68
    [249] => 0.68
    [250] => 0.68
    [251] => 0.68
    [252] => 0.68
    [253] => 0.68
    [254] => 0.68
    [255] => 0.68
    [256] => 0.68
    [257] => 0.68
    [258] => 0.68
    [259] => 0.68
    [260] => 0.68
    [261] => 0.68
    [262] => 0.68
    [263] => 0.68
    [264] => 0.68
    [265] => 0.68
    [266] => 0.68
    [267] => 0.68
    [268] => 0.68
    [269] => 0.67
    [270] => 0.67
    [271] => 0.67
    [272] => 0.67
    [273] => 0.67
    [274] => 0.67
    [275] => 0.67
    [276] => 0.67
    [277] => 0.67
    [278] => 0.67
    [279] => 0.67
    [280] => 0.67
    [281] => 0.67
    [282] => 0.67
    [283] => 0.67
    [284] => 0.67
    [285] => 0.67
    [286] => 0.67
    [287] => 0.67
    [288] => 0.67
    [289] => 0.67
    [290] => 0.66
    [291] => 0.66
    [292] => 0.66
    [293] => 0.66
    [294] => 0.66
    [295] => 0.66
    [296] => 0.66
    [297] => 0.66
    [298] => 0.66
    [299] => 0.66
    [300] => 0.66
    [301] => 0.66
    [302] => 0.66
    [303] => 0.66
    [304] => 0.66
    [305] => 0.66
    [306] => 0.66
    [307] => 0.66
    [308] => 0.66
    [309] => 0.66
    [310] => 0.66
    [311] => 0.66
    [312] => 0.65
    [313] => 0.65
    [314] => 0.65
    [315] => 0.65
    [316] => 0.65
    [317] => 0.65
    [318] => 0.65
    [319] => 0.65
    [320] => 0.65
    [321] => 0.65
    [322] => 0.65
    [323] => 0.65
    [324] => 0.65
    [325] => 0.65
    [326] => 0.65
    [327] => 0.65
    [328] => 0.65
    [329] => 0.65
    [330] => 0.65
    [331] => 0.65
    [332] => 0.64
    [333] => 0.64
    [334] => 0.64
    [335] => 0.64
    [336] => 0.64
    [337] => 0.64
    [338] => 0.64
    [339] => 0.64
    [340] => 0.64
    [341] => 0.64
    [342] => 0.64
    [343] => 0.64
    [344] => 0.64
    [345] => 0.64
    [346] => 0.64
    [347] => 0.64
    [348] => 0.64
    [349] => 0.64
    [350] => 0.64
    [351] => 0.64
    [352] => 0.64
    [353] => 0.63
    [354] => 0.63
    [355] => 0.63
    [356] => 0.63
    [357] => 0.63
    [358] => 0.63
    [359] => 0.63
    [360] => 0.63
    [361] => 0.63
    [362] => 0.63
    [363] => 0.63
    [364] => 0.63
    [365] => 0.63
    [366] => 0.63
    [367] => 0.63
    [368] => 0.63
    [369] => 0.63
    [370] => 0.63
    [371] => 0.63
    [372] => 0.63
    [373] => 0.62
    [374] => 0.62
    [375] => 0.62
    [376] => 0.62
    [377] => 0.62
    [378] => 0.62
    [379] => 0.62
    [380] => 0.62
    [381] => 0.62
    [382] => 0.62
    [383] => 0.62
    [384] => 0.62
    [385] => 0.62
    [386] => 0.62
    [387] => 0.62
    [388] => 0.62
    [389] => 0.62
    [390] => 0.62
    [391] => 0.62
    [392] => 0.62
    [393] => 0.61
    [394] => 0.61
    [395] => 0.61
    [396] => 0.61
    [397] => 0.61
    [398] => 0.61
    [399] => 0.61
    [400] => 0.61
    [401] => 0.61
    [402] => 0.61
    [403] => 0.61
    [404] => 0.61
    [405] => 0.61
    [406] => 0.61
    [407] => 0.61
    [408] => 0.61
    [409] => 0.61
    [410] => 0.61
    [411] => 0.61
    [412] => 0.61
    [413] => 0.6
    [414] => 0.6
    [415] => 0.6
    [416] => 0.6
    [417] => 0.6
    [418] => 0.6
    [419] => 0.6
    [420] => 0.6
    [421] => 0.6
    [422] => 0.6
    [423] => 0.6
    [424] => 0.6
    [425] => 0.6
    [426] => 0.6
    [427] => 0.6
    [428] => 0.6
    [429] => 0.6
    [430] => 0.6
    [431] => 0.6
    [432] => 0.59
    [433] => 0.59
    [434] => 0.59
    [435] => 0.59
    [436] => 0.59
    [437] => 0.59
    [438] => 0.59
    [439] => 0.59
    [440] => 0.59
    [441] => 0.59
    [442] => 0.59
    [443] => 0.59
    [444] => 0.59
    [445] => 0.59
    [446] => 0.59
    [447] => 0.59
    [448] => 0.59
    [449] => 0.59
    [450] => 0.59
    [451] => 0.58
    [452] => 0.58
    [453] => 0.58
    [454] => 0.58
    [455] => 0.58
    [456] => 0.58
    [457] => 0.58
    [458] => 0.58
    [459] => 0.58
    [460] => 0.58
    [461] => 0.58
    [462] => 0.58
    [463] => 0.58
    [464] => 0.58
    [465] => 0.58
    [466] => 0.58
    [467] => 0.58
    [468] => 0.58
    [469] => 0.57
    [470] => 0.57
    [471] => 0.57
    [472] => 0.57
    [473] => 0.57
    [474] => 0.57
    [475] => 0.57
    [476] => 0.57
    [477] => 0.57
    [478] => 0.57
    [479] => 0.57
    [480] => 0.57
    [481] => 0.57
    [482] => 0.57
    [483] => 0.57
    [484] => 0.57
    [485] => 0.57
    [486] => 0.57
    [487] => 0.57
    [488] => 0.56
    [489] => 0.56
    [490] => 0.56
    [491] => 0.56
    [492] => 0.56
    [493] => 0.56
    [494] => 0.56
    [495] => 0.56
    [496] => 0.56
    [497] => 0.56
    [498] => 0.56
    [499] => 0.56
    [500] => 0.56
    [501] => 0.56
    [502] => 0.56
    [503] => 0.56
    [504] => 0.56
    [505] => 0.56
    [506] => 0.55
    [507] => 0.55
    [508] => 0.55
    [509] => 0.55
    [510] => 0.55
    [511] => 0.55
    [512] => 0.55
    [513] => 0.55
    [514] => 0.55
    [515] => 0.55
    [516] => 0.55
    [517] => 0.55
    [518] => 0.55
    [519] => 0.55
    [520] => 0.55
    [521] => 0.55
    [522] => 0.55
    [523] => 0.54
    [524] => 0.54
    [525] => 0.54
    [526] => 0.54
    [527] => 0.54
    [528] => 0.54
    [529] => 0.54
    [530] => 0.54
    [531] => 0.54
    [532] => 0.54
    [533] => 0.54
    [534] => 0.54
    [535] => 0.54
    [536] => 0.54
    [537] => 0.54
    [538] => 0.54
    [539] => 0.54
    [540] => 0.54
    [541] => 0.53
    [542] => 0.53
    [543] => 0.53
    [544] => 0.53
    [545] => 0.53
    [546] => 0.53
    [547] => 0.53
    [548] => 0.53
    [549] => 0.53
    [550] => 0.53
    [551] => 0.53
    [552] => 0.53
    [553] => 0.53
    [554] => 0.53
    [555] => 0.53
    [556] => 0.53
    [557] => 0.53
    [558] => 0.52
    [559] => 0.52
    [560] => 0.52
    [561] => 0.52
    [562] => 0.52
    [563] => 0.52
    [564] => 0.52
    [565] => 0.52
    [566] => 0.52
    [567] => 0.52
    [568] => 0.52
    [569] => 0.52
    [570] => 0.52
    [571] => 0.52
    [572] => 0.52
    [573] => 0.52
    [574] => 0.51
    [575] => 0.51
    [576] => 0.51
    [577] => 0.51
    [578] => 0.51
    [579] => 0.51
    [580] => 0.51
    [581] => 0.51
    [582] => 0.51
    [583] => 0.51
    [584] => 0.51
    [585] => 0.51
    [586] => 0.51
    [587] => 0.51
    [588] => 0.51
    [589] => 0.51
    [590] => 0.51
    [591] => 0.5
    [592] => 0.5
    [593] => 0.5
    [594] => 0.5
    [595] => 0.5
    [596] => 0.5
    [597] => 0.5
    [598] => 0.5
    [599] => 0.5
    [600] => 0.5
    [601] => 0.5
    [602] => 0.5
    [603] => 0.5
    [604] => 0.5
    [605] => 0.5
    [606] => 0.5
    [607] => 0.49
    [608] => 0.49
    [609] => 0.49
    [610] => 0.49
    [611] => 0.49
    [612] => 0.49
    [613] => 0.49
    [614] => 0.49
    [615] => 0.49
    [616] => 0.49
    [617] => 0.49
    [618] => 0.49
    [619] => 0.49
    [620] => 0.49
    [621] => 0.49
    [622] => 0.48
    [623] => 0.48
    [624] => 0.48
    [625] => 0.48
    [626] => 0.48
    [627] => 0.48
    [628] => 0.48
    [629] => 0.48
    [630] => 0.48
    [631] => 0.48
    [632] => 0.48
    [633] => 0.48
    [634] => 0.48
    [635] => 0.48
    [636] => 0.48
    [637] => 0.48
    [638] => 0.47
    [639] => 0.47
    [640] => 0.47
    [641] => 0.47
    [642] => 0.47
    [643] => 0.47
    [644] => 0.47
    [645] => 0.47
    [646] => 0.47
    [647] => 0.47
    [648] => 0.47
    [649] => 0.47
    [650] => 0.47
    [651] => 0.47
    [652] => 0.47
    [653] => 0.46
    [654] => 0.46
    [655] => 0.46
    [656] => 0.46
    [657] => 0.46
    [658] => 0.46
    [659] => 0.46
    [660] => 0.46
    [661] => 0.46
    [662] => 0.46
    [663] => 0.46
    [664] => 0.46
    [665] => 0.46
    [666] => 0.46
    [667] => 0.46
    [668] => 0.45
    [669] => 0.45
    [670] => 0.45
    [671] => 0.45
    [672] => 0.45
    [673] => 0.45
    [674] => 0.45
    [675] => 0.45
    [676] => 0.45
    [677] => 0.45
    [678] => 0.45
    [679] => 0.45
    [680] => 0.45
    [681] => 0.45
    [682] => 0.44
    [683] => 0.44
    [684] => 0.44
    [685] => 0.44
    [686] => 0.44
    [687] => 0.44
    [688] => 0.44
    [689] => 0.44
    [690] => 0.44
    [691] => 0.44
    [692] => 0.44
    [693] => 0.44
    [694] => 0.44
    [695] => 0.44
    [696] => 0.43
    [697] => 0.43
    [698] => 0.43
    [699] => 0.43
    [700] => 0.43
    [701] => 0.43
    [702] => 0.43
    [703] => 0.43
    [704] => 0.43
    [705] => 0.43
    [706] => 0.43
    [707] => 0.43
    [708] => 0.43
    [709] => 0.43
    [710] => 0.42
    [711] => 0.42
    [712] => 0.42
    [713] => 0.42
    [714] => 0.42
    [715] => 0.42
    [716] => 0.42
    [717] => 0.42
    [718] => 0.42
    [719] => 0.42
    [720] => 0.42
    [721] => 0.42
    [722] => 0.42
    [723] => 0.41
    [724] => 0.41
    [725] => 0.41
    [726] => 0.41
    [727] => 0.41
    [728] => 0.41
    [729] => 0.41
    [730] => 0.41
    [731] => 0.41
    [732] => 0.41
    [733] => 0.41
    [734] => 0.41
    [735] => 0.41
    [736] => 0.41
    [737] => 0.4
    [738] => 0.4
    [739] => 0.4
    [740] => 0.4
    [741] => 0.4
    [742] => 0.4
    [743] => 0.4
    [744] => 0.4
    [745] => 0.4
    [746] => 0.4
    [747] => 0.4
    [748] => 0.4
    [749] => 0.39
    [750] => 0.39
    [751] => 0.39
    [752] => 0.39
    [753] => 0.39
    [754] => 0.39
    [755] => 0.39
    [756] => 0.39
    [757] => 0.39
    [758] => 0.39
    [759] => 0.39
    [760] => 0.39
    [761] => 0.39
    [762] => 0.38
    [763] => 0.38
    [764] => 0.38
    [765] => 0.38
    [766] => 0.38
    [767] => 0.38
    [768] => 0.38
    [769] => 0.38
    [770] => 0.38
    [771] => 0.38
    [772] => 0.38
    [773] => 0.38
    [774] => 0.37
    [775] => 0.37
    [776] => 0.37
    [777] => 0.37
    [778] => 0.37
    [779] => 0.37
    [780] => 0.37
    [781] => 0.37
    [782] => 0.37
    [783] => 0.37
    [784] => 0.37
    [785] => 0.37
    [786] => 0.36
    [787] => 0.36
    [788] => 0.36
    [789] => 0.36
    [790] => 0.36
    [791] => 0.36
    [792] => 0.36
    [793] => 0.36
    [794] => 0.36
    [795] => 0.36
    [796] => 0.36
    [797] => 0.36
    [798] => 0.35
    [799] => 0.35
    [800] => 0.35
    [801] => 0.35
    [802] => 0.35
    [803] => 0.35
    [804] => 0.35
    [805] => 0.35
    [806] => 0.35
    [807] => 0.35
    [808] => 0.35
    [809] => 0.34
    [810] => 0.34
    [811] => 0.34
    [812] => 0.34
    [813] => 0.34
    [814] => 0.34
    [815] => 0.34
    [816] => 0.34
    [817] => 0.34
    [818] => 0.34
    [819] => 0.34
    [820] => 0.33
    [821] => 0.33
    [822] => 0.33
    [823] => 0.33
    [824] => 0.33
    [825] => 0.33
    [826] => 0.33
    [827] => 0.33
    [828] => 0.33
    [829] => 0.33
    [830] => 0.32
    [831] => 0.32
    [832] => 0.32
    [833] => 0.32
    [834] => 0.32
    [835] => 0.32
    [836] => 0.32
    [837] => 0.32
    [838] => 0.32
    [839] => 0.32
    [840] => 0.31
    [841] => 0.31
    [842] => 0.31
    [843] => 0.31
    [844] => 0.31
    [845] => 0.31
    [846] => 0.31
    [847] => 0.31
    [848] => 0.31
    [849] => 0.31
    [850] => 0.3
    [851] => 0.3
    [852] => 0.3
    [853] => 0.3
    [854] => 0.3
    [855] => 0.3
    [856] => 0.3
    [857] => 0.3
    [858] => 0.3
    [859] => 0.3
    [860] => 0.29
    [861] => 0.29
    [862] => 0.29
    [863] => 0.29
    [864] => 0.29
    [865] => 0.29
    [866] => 0.29
    [867] => 0.29
    [868] => 0.29
    [869] => 0.28
    [870] => 0.28
    [871] => 0.28
    [872] => 0.28
    [873] => 0.28
    [874] => 0.28
    [875] => 0.28
    [876] => 0.28
    [877] => 0.28
    [878] => 0.27
    [879] => 0.27
    [880] => 0.27
    [881] => 0.27
    [882] => 0.27
    [883] => 0.27
    [884] => 0.27
    [885] => 0.27
    [886] => 0.27
    [887] => 0.26
    [888] => 0.26
    [889] => 0.26
    [890] => 0.26
    [891] => 0.26
    [892] => 0.26
    [893] => 0.26
    [894] => 0.26
    [895] => 0.26
    [896] => 0.25
    [897] => 0.25
    [898] => 0.25
    [899] => 0.25
    [900] => 0.25
    [901] => 0.25
    [902] => 0.25
    [903] => 0.24
    [904] => 0.24
    [905] => 0.24
    [906] => 0.24
    [907] => 0.24
    [908] => 0.24
    [909] => 0.24
    [910] => 0.24
    [911] => 0.23
    [912] => 0.23
    [913] => 0.23
    [914] => 0.23
    [915] => 0.23
    [916] => 0.23
    [917] => 0.23
    [918] => 0.23
    [919] => 0.22
    [920] => 0.22
    [921] => 0.22
    [922] => 0.22
    [923] => 0.22
    [924] => 0.22
    [925] => 0.22
    [926] => 0.21
    [927] => 0.21
    [928] => 0.21
    [929] => 0.21
    [930] => 0.21
    [931] => 0.21
    [932] => 0.2
    [933] => 0.2
    [934] => 0.2
    [935] => 0.2
    [936] => 0.2
    [937] => 0.2
    [938] => 0.2
    [939] => 0.19
    [940] => 0.19
    [941] => 0.19
    [942] => 0.19
    [943] => 0.19
    [944] => 0.19
    [945] => 0.18
    [946] => 0.18
    [947] => 0.18
    [948] => 0.18
    [949] => 0.18
    [950] => 0.18
    [951] => 0.17
    [952] => 0.17
    [953] => 0.17
    [954] => 0.17
    [955] => 0.17
    [956] => 0.16
    [957] => 0.16
    [958] => 0.16
    [959] => 0.16
    [960] => 0.16
    [961] => 0.15
    [962] => 0.15
    [963] => 0.15
    [964] => 0.15
    [965] => 0.15
    [966] => 0.14
    [967] => 0.14
    [968] => 0.14
    [969] => 0.14
    [970] => 0.14
    [971] => 0.13
    [972] => 0.13
    [973] => 0.13
    [974] => 0.13
    [975] => 0.12
    [976] => 0.12
    [977] => 0.12
    [978] => 0.11
    [979] => 0.11
    [980] => 0.11
    [981] => 0.11
    [982] => 0.1
    [983] => 0.1
    [984] => 0.1
    [985] => 0.09
    [986] => 0.09
    [987] => 0.09
    [988] => 0.08
    [989] => 0.08
    [990] => 0.08
    [991] => 0.07
    [992] => 0.07
    [993] => 0.06
    [994] => 0.06
    [995] => 0.05
    [996] => 0.05
    [997] => 0.04
    [998] => 0.02
    [999] => 0.01
)

 */





?>