小代码算法小题目-创新互联
#includeint main() { int e, g, f; int a, b, c; int eh, el, gh, gl, fh, fl; for (a = 1;a < 10;a++) { for (b = 1;b < 10;b++) { if (a == b) { continue; } for (c = 1;c < 10;c++) { if (b == c||a == c) { continue; } for (e = 11;e < 100;e++) { eh = e / 10; el = e % 10; if (eh == a || eh == c || el == c || eh == b || el == a || el == b || eh == 0 || el == 0 || eh == el) { continue; } for (f = 11;f < 100;f++) { fh = f / 10; fl = f % 10; if (fh == a || fh == c || fl == c || fh == b || fl == a || fl == b || fh == 0 || fl == 0 || fh == fl || fh == el || fh == eh || fl == el || fl == eh) { continue; } for (g = 11;g < 100;g++) { gh = g / 10; gl = g % 10; if (gh == a || gh == c || gl == c || gh == b || gl == a || gl == b || gh == 0 || gl == 0 || gh == gl || gh == el || gh == eh || gl == el || gl == eh || gh == fl || gh == fh || gl == fh || gl == fl) { continue; } //printf("bbbbbbbbbb\n"); if (a*f*g + b*e*g == c*e*f) { printf("%d %d %d %d %d %d\n", a, b, c, e, f, g); } } } } } } } printf("ccccccccccccccccccc\n"); getchar(); return 0; }
//http://tool.lu//
创新互联是一家专注于成都网站制作、成都网站设计与策划设计,安福网站建设哪家好?创新互联做网站,专注于网站建设10余年,网设计领域的专业建站公司;建站业务涵盖:安福等地区。安福做网站价格咨询:18980820575创新互联www.cdcxhl.cn,专业提供香港、美国云服务器,动态BGP最优骨干路由自动选择,持续稳定高效的网络助力业务部署。公司持有工信部办法的idc、isp许可证, 机房独有T级流量清洗系统配攻击溯源,准确进行流量调度,确保服务器高可用性。佳节活动现已开启,新人活动云服务器买多久送多久。
当前标题:小代码算法小题目-创新互联
文章地址:http://scyanting.com/article/dhjidd.html