跳到正文

个人记录

最新研究:我算出了 Florr.io 里平均需要多少张 Common 才能合成一张 Super!

Segment_Furina约 3 分钟
原文
文章信息与版本

文章信息

发布
2024年12月30日
收录
2025年12月12日
更新
2026年11月17日
篇幅
约 3 分钟
获赞
2

版本

  1. v1当前

利用期望 dp 算法,我写出了以下代码:

C++
#include<bits/stdc++.h>
using namespace std; 
const int N=1e7+5;
double f[N],ans=1;
string str[]={"Common","Unusuall","Rare","Epic","Legendary","Mythic","Ultra","Super"};
int now=0;
int main(){
	for(double k=0.64;k>=0.01;k/=2){
		memset(f,0,sizeof f);
		f[5]=k;
		double s=0;
		for(int i=5;i<N-1;++i)
			for(int j=i+1;j<=i+4&&j<N;++j)f[j]+=f[i]/4*(1-k);
		for(int i=0;i<N;++i)s+=f[i]*i;
		ans*=s;
		if(k!=0.01)ans*=5;
		cout<<str[now]<<"->"<<str[now+1]<<':'<<s<<endl;
		now++;
	}
	long long ss=ans;
	printf("Common->Super:%lld",ss);
	return 0;
}

输出:

代码
Common->Unusuall:6.40625
Unusuall->Rare:10.3125
Rare->Epic:18.125
Epic->Legendary:33.75
Legendary->Mythic:65
Mythic->Ultra:127.5
Ultra->Super:252.5
Common->Super:1321370438430427

下面是按旧版本的合成概率计算的代码:

C++
#include<bits/stdc++.h>
using namespace std; 
const int N=1e7+5;
double f[N],ans=1,tt[]={0.6,0.45,0.2,0.1,0.03,0.02,0.01};
string str[]={"Common","Unusuall","Rare","Epic","Legendary","Mythic","Ultra","Super"};
int now=0;
int main(){
	while(now<7){
		memset(f,0,sizeof f);
		double k=tt[now];
		f[5]=k;
		double s=0;
		for(int i=5;i<N-1;++i)
			for(int j=i+1;j<=i+4&&j<N;++j)f[j]+=f[i]/4*(1-k);
		for(int i=0;i<N;++i)s+=f[i]*i;
		ans*=s;
		if(k!=0.01)ans*=5;
		cout<<str[now]<<"->"<<str[now+1]<<':'<<s<<endl;
		now++;
	}
	long long ss=ans;
	printf("Common->Super:%lld",ss);
	return 0;
}

输出:

代码
Common->Unusuall:6.66667
Unusuall->Rare:8.05556
Rare->Epic:15
Epic->Legendary:27.5
Legendary->Mythic:85.8333
Mythic->Ultra:127.5
Ultra->Super:252.5
Common->Super:956479712592210
原文