html公司网站模板源码,营销网络建设,济南网站建设价格,wordpress批量注册用户Description
一张面值100元的人民币换成10元、5元、2元和1元面值的票子。要求换正好40张#xff0c;且每种票子至少一张。问#xff1a;有几种换法#xff1f;
#include stdio.h
int main() {int count 0;int i, j, t, k, ret 0;for (i 1; i 37; i) {for …Description
一张面值100元的人民币换成10元、5元、2元和1元面值的票子。要求换正好40张且每种票子至少一张。问有几种换法
#include stdio.h
int main() {int count 0;int i, j, t, k, ret 0;for (i 1; i 37; i) {for (j 1; j 37; j) {for (t 1; t 18; t) {for (k 1; k 10; k) {if ((i j t k) 40 (i * 1 j * 2 t * 5 k * 10) 100) {count;}}}}}printf(%d\n, count);return 0;
}