import random
def simulate_wish(num_wishes):
five_star_prob = 0.01
pity_counter = 0
guaranteed_featured = False
results = []
five_star_count = 0
featured_count = 0
other_count = 0
for i in range(1, num_wishes + 1):
if pity_counter >= 60:
five_star_prob = min(five_star_prob + 0.10, 1.0)
if random.random() < five_star_prob:
if guaranteed_featured or random.random() < 0.5:
result = f"第{i}次许愿结果: 5星思念【祁煜·沉入无尽海】"
featured_count += 1
guaranteed_featured = False
else:
result = f"第{i}次许愿结果: 5星思念(非本期活动限定)"
other_count += 1
guaranteed_featured = True
five_star_count += 1
results.append(result)
five_star_prob = 0.01
pity_counter = 0
else:
pity_counter += 1
print("\n=== 许愿结果 ===")
for result in results:
print(result)
print("\n=== 汇总统计 ===")
print(f"总许愿次数: {num_wishes} 次")
print(f"总5星思念数量: {five_star_count} 个")
print(f" - 【祁煜·沉入无尽海】: {featured_count} 个")
print(f" - 其他5星思念: {other_count} 个")
print(f"触发保底机制次数: {five_star_count - (num_wishes * 0.01):.0f} 次")
num_wishes = int(input("请输入许愿次数: "))
simulate_wish(num_wishes)