1 条题解
-
0
C :
#include "stdio.h" const int totalPeople = 30; const int totalMoney = 50; int main() { int man, women, children; for (man = 0; man < 17; ++man) { for (women = 0; women <= 25; ++women) { children = 30 - man - women; if (children >= 0 && (3 * man + 2 * women + children == 50)) { printf("%3d%8d%8d\n", man, women, children); } } } return 0; }
- 1
信息
- ID
- 104
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者