官方FB 妖精&巫師法術新卡中文 - 線上
By Frederica
at 2018-09-15T16:03
at 2018-09-15T16:03
Table of Contents
※ 引述《shyin7089 (希音)》之銘言:
: ※ 引述《z897899878 (ascdge)》之銘言:
: : https://goo.gl/CC8GY5
: : https://imgur.com/zCpLjrS.jpg
: : https://imgur.com/r3fidv7.jpg
: 結論:我覺得與其要用這張收頭,還不如乖乖用大奇,這張頂多算是讓對手進斬殺線的手
: 段,畢竟還有其他3/3+X/X跟補血。
結果他是取總和固定時每個(X,Y,Z)三元組機率一樣的分布也是有可能的啊
code也不難,令N為共鳴次數
int N = 20;
int all = (N + 1) * (N + 2) / 2;
int target = (int) (Math.random() * all);
int x = -1, y = -1, z = -1;
int sum = 0;
for (int x_ = 1; sum < all; x_++) {
sum += x_;
if (sum > target) {
x = N - x_ + 1;
y = sum - target - 1;
z = N - x - y;
break;
}
}
簡化版:
int t=(int)(rand()*((N+1)(N+2)/2));
X=N-(int)((sqrt(1+8t)-1)/2);
Y=(int)(Math.random()*(N-X+1));
Z=N-X-Y;
當N=20時,20點糊到對面臉上機率=23/23兵兵機率=自己滿血奶0(x)機率=1/231
--
: ※ 引述《z897899878 (ascdge)》之銘言:
: : https://goo.gl/CC8GY5
: : https://imgur.com/zCpLjrS.jpg
: : https://imgur.com/r3fidv7.jpg
: 結論:我覺得與其要用這張收頭,還不如乖乖用大奇,這張頂多算是讓對手進斬殺線的手
: 段,畢竟還有其他3/3+X/X跟補血。
結果他是取總和固定時每個(X,Y,Z)三元組機率一樣的分布也是有可能的啊
code也不難,令N為共鳴次數
int N = 20;
int all = (N + 1) * (N + 2) / 2;
int target = (int) (Math.random() * all);
int x = -1, y = -1, z = -1;
int sum = 0;
for (int x_ = 1; sum < all; x_++) {
sum += x_;
if (sum > target) {
x = N - x_ + 1;
y = sum - target - 1;
z = N - x - y;
break;
}
}
簡化版:
int t=(int)(rand()*((N+1)(N+2)/2));
X=N-(int)((sqrt(1+8t)-1)/2);
Y=(int)(Math.random()*(N-X+1));
Z=N-X-Y;
當N=20時,20點糊到對面臉上機率=23/23兵兵機率=自己滿血奶0(x)機率=1/231
--
Tags:
線上
All Comments
By Robert
at 2018-09-17T09:26
at 2018-09-17T09:26
By Lauren
at 2018-09-20T10:22
at 2018-09-20T10:22
By Ophelia
at 2018-09-24T01:29
at 2018-09-24T01:29
By Puput
at 2018-09-27T06:58
at 2018-09-27T06:58
By Enid
at 2018-09-28T12:38
at 2018-09-28T12:38
By Dora
at 2018-10-02T02:12
at 2018-10-02T02:12
By Hardy
at 2018-10-04T11:09
at 2018-10-04T11:09
By Necoo
at 2018-10-04T23:51
at 2018-10-04T23:51
By Genevieve
at 2018-10-05T07:51
at 2018-10-05T07:51
By Puput
at 2018-10-06T09:57
at 2018-10-06T09:57
By Bethany
at 2018-10-08T19:00
at 2018-10-08T19:00
By Irma
at 2018-10-13T11:27
at 2018-10-13T11:27
By Megan
at 2018-10-17T07:30
at 2018-10-17T07:30
By Olivia
at 2018-10-19T12:29
at 2018-10-19T12:29
By Belly
at 2018-10-20T04:43
at 2018-10-20T04:43
Related Posts
血鬼新虹 by IGN
By Daniel
at 2018-09-15T11:26
at 2018-09-15T11:26
是的,昨天的JCG無限就是你們想的那樣
By Annie
at 2018-09-15T00:38
at 2018-09-15T00:38
十傑簡評
By Eden
at 2018-09-15T00:31
at 2018-09-15T00:31
貝爾利亞4級公會收人
By Hazel
at 2018-09-14T22:08
at 2018-09-14T22:08
BlueFat 就是要靠賽 明天開打
By Franklin
at 2018-09-14T22:00
at 2018-09-14T22:00