commit 479c015a6601a0410d4b9b81165190717f662da6 Author: swangnice Date: Tue Aug 5 11:52:18 2025 +0800 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e90dc47 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 双色球模拟器 + +用魔法打败魔法,用概率验证概率,为我那个爱买彩票的兄弟定制。 diff --git a/win.py b/win.py new file mode 100644 index 0000000..9da0bc9 --- /dev/null +++ b/win.py @@ -0,0 +1,15 @@ +import random + +def generate_double_chromosphere(): + red_balls = random.sample(range(1, 34), 6) + red_balls.sort() + blue_ball = random.randint(1, 16) + return red_balls, blue_ball + +def shake(times=1): + for i in range(1, times + 1): + reds, blue = generate_double_chromosphere() + print(f"第{i}次摇号结果:红球 {reds} | 蓝球 [{blue}]") + +if __name__ == "__main__": + shake(5) \ No newline at end of file