从1到33中,任选6个数作为组合,且每个数组中都有1的组合方式
答案:4 悬赏:60 手机版
解决时间 2021-11-22 21:46
- 提问者网友:黑米和小志
- 2021-11-22 12:46
从1到33中,任选6个数作为组合,且每个数组中都有1的组合方式
最佳答案
- 五星知识达人网友:神鬼未生
- 2021-11-22 14:06
201376种组合方式方式, 按顺序输出,你慢慢看
#include
#include
#define COUNT 33
int main()
{
int x1, x2, x3, x4, x5, x6;
x1 = 1;
for (x2 = x1 + 1; x2 <= COUNT; x2++)
for (x3 = x2 + 1; x3 <= COUNT; x3++)
for (x4 = x3 + 1; x4 <= COUNT; x4++)
for (x5 = x4 + 1; x5 <= COUNT; x5++)
for (x6 = x5 + 1; x6 <= COUNT; x6++)
printf("%d %d %d %d %d %d\n", x1, x2, x3, x4, x5, x6);
return 0;
}
#include
#include
#define COUNT 33
int main()
{
int x1, x2, x3, x4, x5, x6;
x1 = 1;
for (x2 = x1 + 1; x2 <= COUNT; x2++)
for (x3 = x2 + 1; x3 <= COUNT; x3++)
for (x4 = x3 + 1; x4 <= COUNT; x4++)
for (x5 = x4 + 1; x5 <= COUNT; x5++)
for (x6 = x5 + 1; x6 <= COUNT; x6++)
printf("%d %d %d %d %d %d\n", x1, x2, x3, x4, x5, x6);
return 0;
}
全部回答
- 1楼网友:我住北渡口
- 2021-11-22 15:52
你是想求有多少种吗?
- 2楼网友:你哪知我潦倒为你
- 2021-11-22 14:37
没太看明白问题。追问就是双色球里的1-33个数呀
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯