0到9 随便选7个数相加等于30 这样的组合有多少

问题描述:

0到9 随便选7个数相加等于30 这样的组合有多少
就是说从0到9里面选出7个数来可以重复相加等于30,例如9993000 0003999 0030999 这样的数相加等于30的组合有多少呀
那为什么是7的平方一直加到1的平方呢,是什么公式呀,你这样算好像不对呀那要是8880006呢 0006888这样不是也有好多吗,到家再帮我算算,我在追加赏金
意思明白了您能说说答案吗,要是真的140的话最好把答案一个一个的列出来全列好了,直接采纳真这是麻烦各位了,
很是感谢最后的两个朋友的回答,但还是选择最后的一个朋友为答案,

(1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9)^7
=
1 + 7 x + 28 x^2 + 84 x^3 + 210 x^4 + 462 x^5 + 924 x^6 + 1716 x^7 + 3003 x^8 + 5005 x^9 + 8001 x^10 + 12327 x^11 + 18368 x^12 + 26544 x^13 + 37290 x^14 + 51030 x^15 + 68145 x^16 + 88935 x^17 + 113575 x^18 + 142065 x^19 + 174195 x^20 + 209525 x^21 + 247380 x^22 + 286860 x^23 + 326865 x^24 + 366135 x^25 + 403305 x^26 + 436975 x^27 + 465795 x^28 + 488565 x^29 + 504315 x^30 + 512365 x^31 + 512365 x^32 + 504315 x^33 + 488565 x^34 + 465795 x^35 + 436975 x^36 + 403305 x^37 + 366135 x^38 + 326865 x^39 + 286860 x^40 + 247380 x^41 + 209525 x^42 + 174195 x^43 + 142065 x^44 + 113575 x^45 + 88935 x^46 + 68145 x^47 + 51030 x^48 + 37290 x^49 + 26544 x^50 + 18368 x^51 + 12327 x^52 + 8001 x^53 + 5005 x^54 + 3003 x^55 + 1716 x^56 + 924 x^57 + 462 x^58 + 210 x^59 + 84 x^60 + 28 x^61 + 7 x^62 + x^63
其中504315 x^30系数为504315,也就是你需要的结果.
这是100000以内的所有数字的组合,不够7位的前面补零就是7位数字了,
总共3246个,如果是7位数的话至少10万以上的组合,我的机子没法运行的.
{3999, 4899, 4989, 4998, 5799, 5889, 5898, 5979, 5988, 5997, 6699,
6789, 6798, 6879, 6888, 6897, 6969, 6978, 6987, 6996, 7599, 7689,
7698, 7779, 7788, 7797, 7869, 7878, 7887, 7896, 7959, 7968, 7977,
7986, 7995, 8499, 8589, 8598, 8679, 8688, 8697, 8769, 8778, 8787,
8796, 8859, 8868, 8877, 8886, 8895, 8949, 8958, 8967, 8976, 8985,
8994, 9399, 9489, 9498, 9579, 9588, 9597, 9669, 9678, 9687, 9696,
9759, 9768, 9777, 9786, 9795, 9849, 9858, 9867, 9876, 9885, 9894,
9939, 9948, 9957, 9966, 9975, 9984, 9993, 12999, 13899, 13989, 13998,
14799, 14889, 14898, 14979, 14988, 14997, 15699, 15789, 15798, 15879,
15888, 15897, 15969, 15978, 15987, 15996, 16599, 16689, 16698, 16779,
16788, 16797, 16869, 16878, 16887, 16896, 16959, 16968, 16977, 16986,
16995, 17499, 17589, 17598, 17679, 17688, 17697, 17769, 17778, 17787,
17796, 17859, 17868, 17877, 17886, 17895, 17949, 17958, 17967, 17976,
17985, 17994, 18399, 18489, 18498, 18579, 18588, 18597, 18669, 18678,
18687, 18696, 18759, 18768, 18777, 18786, 18795, 18849, 18858, 18867,
18876, 18885, 18894, 18939, 18948, 18957, 18966, 18975, 18984, 18993,
19299, 19389, 19398, 19479, 19488, 19497, 19569, 19578, 19587, 19596,
19659, 19668, 19677, 19686, 19695, 19749, 19758, 19767, 19776, 19785,
19794, 19839, 19848, 19857, 19866, 19875, 19884, 19893, 19929, 19938,
19947, 19956, 19965, 19974, 19983, 19992, 21999, 22899, 22989, 22998,
23799, 23889, 23898, 23979, 23988, 23997, 24699, 24789, 24798, 24879,
24888, 24897, 24969, 24978, 24987, 24996, 25599, 25689, 25698, 25779,
25788, 25797, 25869, 25878, 25887, 25896, 25959, 25968, 25977, 25986,
25995, 26499, 26589, 26598, 26679, 26688, 26697, 26769, 26778, 26787,
26796, 26859, 26868, 26877, 26886, 26895, 26949, 26958, 26967, 26976,
26985, 26994, 27399, 27489, 27498, 27579, 27588, 27597, 27669, 27678,
27687, 27696, 27759, 27768, 27777, 27786, 27795, 27849, 27858, 27867,
27876, 27885, 27894, 27939, 27948, 27957, 27966, 27975, 27984, 27993,
28299, 28389, 28398, 28479, 28488, 28497, 28569, 28578, 28587, 28596,
28659, 28668, 28677, 28686, 28695, 28749, 28758, 28767, 28776, 28785,
28794, 28839, 28848, 28857, 28866, 28875, 28884, 28893, 28929, 28938,
28947, 28956, 28965, 28974, 28983, 28992, 29199, 29289, 29298, 29379,
29388, 29397, 29469, 29478, 29487, 29496, 29559, 29568, 29577, 29586,
29595, 29649, 29658, 29667, 29676, 29685, 29694, 29739, 29748, 29757,
29766, 29775, 29784, 29793, 29829, 29838, 29847, 29856, 29865, 29874,
29883, 29892, 29919, 29928, 29937, 29946, 29955, 29964, 29973, 29982,
29991, 30999, 31899, 31989, 31998, 32799, 32889, 32898, 32979, 32988,
32997, 33699, 33789, 33798, 33879, 33888, 33897, 33969, 33978, 33987,
33996, 34599, 34689, 34698, 34779, 34788, 34797, 34869, 34878, 34887,
34896, 34959, 34968, 34977, 34986, 34995, 35499, 35589, 35598, 35679,
35688, 35697, 35769, 35778, 35787, 35796, 35859, 35868, 35877, 35886,
35895, 35949, 35958, 35967, 35976, 35985, 35994, 36399, 36489, 36498,
36579, 36588, 36597, 36669, 36678, 36687, 36696, 36759, 36768, 36777,
36786, 36795, 36849, 36858, 36867, 36876, 36885, 36894, 36939, 36948,
36957, 36966, 36975, 36984, 36993, 37299, 37389, 37398, 37479, 37488,
37497, 37569, 37578, 37587, 37596, 37659, 37668, 37677, 37686, 37695,
37749, 37758, 37767, 37776, 37785, 37794, 37839, 37848, 37857, 37866,
37875, 37884, 37893, 37929, 37938, 37947, 37956, 37965, 37974, 37983,
37992, 38199, 38289, 38298, 38379, 38388, 38397, 38469, 38478, 38487,
38496, 38559, 38568, 38577, 38586, 38595, 38649, 38658, 38667, 38676,
38685, 38694, 38739, 38748, 38757, 38766, 38775, 38784, 38793, 38829,
38838, 38847, 38856, 38865, 38874, 38883, 38892, 38919, 38928, 38937,
38946, 38955, 38964, 38973, 38982, 38991, 39099, 39189, 39198, 39279,
39288, 39297, 39369, 39378, 39387, 39396, 39459, 39468, 39477, 39486,
39495, 39549, 39558, 39567, 39576, 39585, 39594, 39639, 39648, 39657,
39666, 39675, 39684, 39693, 39729, 39738, 39747, 39756, 39765, 39774,
39783, 39792, 39819, 39828, 39837, 39846, 39855, 39864, 39873, 39882,
39891, 39909, 39918, 39927, 39936, 39945, 39954, 39963, 39972, 39981,
39990, 40899, 40989, 40998, 41799, 41889, 41898, 41979, 41988, 41997,
42699, 42789, 42798, 42879, 42888, 42897, 42969, 42978, 42987, 42996,
43599, 43689, 43698, 43779, 43788, 43797, 43869, 43878, 43887, 43896,
43959, 43968, 43977, 43986, 43995, 44499, 44589, 44598, 44679, 44688,
44697, 44769, 44778, 44787, 44796, 44859, 44868, 44877, 44886, 44895,
44949, 44958, 44967, 44976, 44985, 44994, 45399, 45489, 45498, 45579,
45588, 45597, 45669, 45678, 45687, 45696, 45759, 45768, 45777, 45786,
45795, 45849, 45858, 45867, 45876, 45885, 45894, 45939, 45948, 45957,
45966, 45975, 45984, 45993, 46299, 46389, 46398, 46479, 46488, 46497,
46569, 46578, 46587, 46596, 46659, 46668, 46677, 46686, 46695, 46749,
46758, 46767, 46776, 46785, 46794, 46839, 46848, 46857, 46866, 46875,
46884, 46893, 46929, 46938, 46947, 46956, 46965, 46974, 46983, 46992,
47199, 47289, 47298, 47379, 47388, 47397, 47469, 47478, 47487, 47496,
47559, 47568, 47577, 47586, 47595, 47649, 47658, 47667, 47676, 47685,
47694, 47739, 47748, 47757, 47766, 47775, 47784, 47793, 47829, 47838,
47847, 47856, 47865, 47874, 47883, 47892, 47919, 47928, 47937, 47946,
47955, 47964, 47973, 47982, 47991, 48099, 48189, 48198, 48279, 48288,
48297, 48369, 48378, 48387, 48396, 48459, 48468, 48477, 48486, 48495,
48549, 48558, 48567, 48576, 48585, 48594, 48639, 48648, 48657, 48666,
48675, 48684, 48693, 48729, 48738, 48747, 48756, 48765, 48774, 48783,
48792, 48819, 48828, 48837, 48846, 48855, 48864, 48873, 48882, 48891,
48909, 48918, 48927, 48936, 48945, 48954, 48963, 48972, 48981, 48990,
49089, 49098, 49179, 49188, 49197, 49269, 49278, 49287, 49296, 49359,
49368, 49377, 49386, 49395, 49449, 49458, 49467, 49476, 49485, 49494,
49539, 49548, 49557, 49566, 49575, 49584, 49593, 49629, 49638, 49647,
49656, 49665, 49674, 49683, 49692, 49719, 49728, 49737, 49746, 49755,
49764, 49773, 49782, 49791, 49809, 49818, 49827, 49836, 49845, 49854,
49863, 49872, 49881, 49890, 49908, 49917, 49926, 49935, 49944, 49953,
49962, 49971, 49980, 50799, 50889, 50898, 50979, 50988, 50997, 51699,
51789, 51798, 51879, 51888, 51897, 51969, 51978, 51987, 51996, 52599,
52689, 52698, 52779, 52788, 52797, 52869, 52878, 52887, 52896, 52959,
52968, 52977, 52986, 52995, 53499, 53589, 53598, 53679, 53688, 53697,
53769, 53778, 53787, 53796, 53859, 53868, 53877, 53886, 53895, 53949,
53958, 53967, 53976, 53985, 53994, 54399, 54489, 54498, 54579, 54588,
54597, 54669, 54678, 54687, 54696, 54759, 54768, 54777, 54786, 54795,
54849, 54858, 54867, 54876, 54885, 54894, 54939, 54948, 54957, 54966,
54975, 54984, 54993, 55299, 55389, 55398, 55479, 55488, 55497, 55569,
55578, 55587, 55596, 55659, 55668, 55677, 55686, 55695, 55749, 55758,
55767, 55776, 55785, 55794, 55839, 55848, 55857, 55866, 55875, 55884,
55893, 55929, 55938, 55947, 55956, 55965, 55974, 55983, 55992, 56199,
56289, 56298, 56379, 56388, 56397, 56469, 56478, 56487, 56496, 56559,
56568, 56577, 56586, 56595, 56649, 56658, 56667, 56676, 56685, 56694,
56739, 56748, 56757, 56766, 56775, 56784, 56793, 56829, 56838, 56847,
56856, 56865, 56874, 56883, 56892, 56919, 56928, 56937, 56946, 56955,
.
79752, 79761, 79770, 79806, 79815, 79824, 79833, 79842, 79851, 79860,
79905, 79914, 79923, 79932, 79941, 79950, 80499, 80589, 80598, 80679,
80688, 80697, 80769, 80778, 80787, 80796, 80859, 80868, 80877, 80886,
80895, 80949, 80958, 80967, 80976, 80985, 80994, 81399, 81489, 81498,
81579, 81588, 81597, 81669, 81678, 81687, 81696, 81759, 81768, 81777,
81786, 81795, 81849, 81858, 81867, 81876, 81885, 81894, 81939, 81948,
81957, 81966, 81975, 81984, 81993, 82299, 82389, 82398, 82479, 82488,
82497, 82569, 82578, 82587, 82596, 82659, 82668, 82677, 82686, 82695,
82749, 82758, 82767, 82776, 82785, 82794, 82839, 82848, 82857, 82866,
82875, 82884, 82893, 82929, 82938, 82947, 82956, 82965, 82974, 82983,
82992, 83199, 83289, 83298, 83379, 83388, 83397, 83469, 83478, 83487,
83496, 83559, 83568, 83577, 83586, 83595, 83649, 83658, 83667, 83676,
83685, 83694, 83739, 83748, 83757, 83766, 83775, 83784, 83793, 83829,
83838, 83847, 83856, 83865, 83874, 83883, 83892, 83919, 83928, 83937,
83946, 83955, 83964, 83973, 83982, 83991, 84099, 84189, 84198, 84279,
84288, 84297, 84369, 84378, 84387, 84396, 84459, 84468, 84477, 84486,
84495, 84549, 84558, 84567, 84576, 84585, 84594, 84639, 84648, 84657,
84666, 84675, 84684, 84693, 84729, 84738, 84747, 84756, 84765, 84774,
84783, 84792, 84819, 84828, 84837, 84846, 84855, 84864, 84873, 84882,
84891, 84909, 84918, 84927, 84936, 84945, 84954, 84963, 84972, 84981,
84990, 85089, 85098, 85179, 85188, 85197, 85269, 85278, 85287, 85296,
85359, 85368, 85377, 85386, 85395, 85449, 85458, 85467, 85476, 85485,
85494, 85539, 85548, 85557, 85566, 85575, 85584, 85593, 85629, 85638,
85647, 85656, 85665, 85674, 85683, 85692, 85719, 85728, 85737, 85746,
85755, 85764, 85773, 85782, 85791, 85809, 85818, 85827, 85836, 85845,
85854, 85863, 85872, 85881, 85890, 85908, 85917, 85926, 85935, 85944,
85953, 85962, 85971, 85980, 86079, 86088, 86097, 86169, 86178, 86187,
86196, 86259, 86268, 86277, 86286, 86295, 86349, 86358, 86367, 86376,
86385, 86394, 86439, 86448, 86457, 86466, 86475, 86484, 86493, 86529,
86538, 86547, 86556, 86565, 86574, 86583, 86592, 86619, 86628, 86637,
86646, 86655, 86664, 86673, 86682, 86691, 86709, 86718, 86727, 86736,
86745, 86754, 86763, 86772, 86781, 86790, 86808, 86817, 86826, 86835,
86844, 86853, 86862, 86871, 86880, 86907, 86916, 86925, 86934, 86943,
86952, 86961, 86970, 87069, 87078, 87087, 87096, 87159, 87168, 87177,
87186, 87195, 87249, 87258, 87267, 87276, 87285, 87294, 87339, 87348,
87357, 87366, 87375, 87384, 87393, 87429, 87438, 87447, 87456, 87465,
87474, 87483, 87492, 87519, 87528, 87537, 87546, 87555, 87564, 87573,
87582, 87591, 87609, 87618, 87627, 87636, 87645, 87654, 87663, 87672,
87681, 87690, 87708, 87717, 87726, 87735, 87744, 87753, 87762, 87771,
87780, 87807, 87816, 87825, 87834, 87843, 87852, 87861, 87870, 87906,
87915, 87924, 87933, 87942, 87951, 87960, 88059, 88068, 88077, 88086,
88095, 88149, 88158, 88167, 88176, 88185, 88194, 88239, 88248, 88257,
88266, 88275, 88284, 88293, 88329, 88338, 88347, 88356, 88365, 88374,
88383, 88392, 88419, 88428, 88437, 88446, 88455, 88464, 88473, 88482,
88491, 88509, 88518, 88527, 88536, 88545, 88554, 88563, 88572, 88581,
88590, 88608, 88617, 88626, 88635, 88644, 88653, 88662, 88671, 88680,
88707, 88716, 88725, 88734, 88743, 88752, 88761, 88770, 88806, 88815,
88824, 88833, 88842, 88851, 88860, 88905, 88914, 88923, 88932, 88941,
88950, 89049, 89058, 89067, 89076, 89085, 89094, 89139, 89148, 89157,
89166, 89175, 89184, 89193, 89229, 89238, 89247, 89256, 89265, 89274,
89283, 89292, 89319, 89328, 89337, 89346, 89355, 89364, 89373, 89382,
89391, 89409, 89418, 89427, 89436, 89445, 89454, 89463, 89472, 89481,
89490, 89508, 89517, 89526, 89535, 89544, 89553, 89562, 89571, 89580,
89607, 89616, 89625, 89634, 89643, 89652, 89661, 89670, 89706, 89715,
89724, 89733, 89742, 89751, 89760, 89805, 89814, 89823, 89832, 89841,
89850, 89904, 89913, 89922, 89931, 89940, 90399, 90489, 90498, 90579,
90588, 90597, 90669, 90678, 90687, 90696, 90759, 90768, 90777, 90786,
90795, 90849, 90858, 90867, 90876, 90885, 90894, 90939, 90948, 90957,
90966, 90975, 90984, 90993, 91299, 91389, 91398, 91479, 91488, 91497,
91569, 91578, 91587, 91596, 91659, 91668, 91677, 91686, 91695, 91749,
91758, 91767, 91776, 91785, 91794, 91839, 91848, 91857, 91866, 91875,
91884, 91893, 91929, 91938, 91947, 91956, 91965, 91974, 91983, 91992,
92199, 92289, 92298, 92379, 92388, 92397, 92469, 92478, 92487, 92496,
92559, 92568, 92577, 92586, 92595, 92649, 92658, 92667, 92676, 92685,
92694, 92739, 92748, 92757, 92766, 92775, 92784, 92793, 92829, 92838,
92847, 92856, 92865, 92874, 92883, 92892, 92919, 92928, 92937, 92946,
92955, 92964, 92973, 92982, 92991, 93099, 93189, 93198, 93279, 93288,
93297, 93369, 93378, 93387, 93396, 93459, 93468, 93477, 93486, 93495,
93549, 93558, 93567, 93576, 93585, 93594, 93639, 93648, 93657, 93666,
93675, 93684, 93693, 93729, 93738, 93747, 93756, 93765, 93774, 93783,
93792, 93819, 93828, 93837, 93846, 93855, 93864, 93873, 93882, 93891,
93909, 93918, 93927, 93936, 93945, 93954, 93963, 93972, 93981, 93990,
94089, 94098, 94179, 94188, 94197, 94269, 94278, 94287, 94296, 94359,
94368, 94377, 94386, 94395, 94449, 94458, 94467, 94476, 94485, 94494,
94539, 94548, 94557, 94566, 94575, 94584, 94593, 94629, 94638, 94647,
94656, 94665, 94674, 94683, 94692, 94719, 94728, 94737, 94746, 94755,
94764, 94773, 94782, 94791, 94809, 94818, 94827, 94836, 94845, 94854,
94863, 94872, 94881, 94890, 94908, 94917, 94926, 94935, 94944, 94953,
94962, 94971, 94980, 95079, 95088, 95097, 95169, 95178, 95187, 95196,
95259, 95268, 95277, 95286, 95295, 95349, 95358, 95367, 95376, 95385,
95394, 95439, 95448, 95457, 95466, 95475, 95484, 95493, 95529, 95538,
95547, 95556, 95565, 95574, 95583, 95592, 95619, 95628, 95637, 95646,
95655, 95664, 95673, 95682, 95691, 95709, 95718, 95727, 95736, 95745,
95754, 95763, 95772, 95781, 95790, 95808, 95817, 95826, 95835, 95844,
95853, 95862, 95871, 95880, 95907, 95916, 95925, 95934, 95943, 95952,
95961, 95970, 96069, 96078, 96087, 96096, 96159, 96168, 96177, 96186,
96195, 96249, 96258, 96267, 96276, 96285, 96294, 96339, 96348, 96357,
96366, 96375, 96384, 96393, 96429, 96438, 96447, 96456, 96465, 96474,
96483, 96492, 96519, 96528, 96537, 96546, 96555, 96564, 96573, 96582,
96591, 96609, 96618, 96627, 96636, 96645, 96654, 96663, 96672, 96681,
96690, 96708, 96717, 96726, 96735, 96744, 96753, 96762, 96771, 96780,
96807, 96816, 96825, 96834, 96843, 96852, 96861, 96870, 96906, 96915,
96924, 96933, 96942, 96951, 96960, 97059, 97068, 97077, 97086, 97095,
97149, 97158, 97167, 97176, 97185, 97194, 97239, 97248, 97257, 97266,
97275, 97284, 97293, 97329, 97338, 97347, 97356, 97365, 97374, 97383,
97392, 97419, 97428, 97437, 97446, 97455, 97464, 97473, 97482, 97491,
97509, 97518, 97527, 97536, 97545, 97554, 97563, 97572, 97581, 97590,
97608, 97617, 97626, 97635, 97644, 97653, 97662, 97671, 97680, 97707,
97716, 97725, 97734, 97743, 97752, 97761, 97770, 97806, 97815, 97824,
97833, 97842, 97851, 97860, 97905, 97914, 97923, 97932, 97941, 97950,
98049, 98058, 98067, 98076, 98085, 98094, 98139, 98148, 98157, 98166,
98175, 98184, 98193, 98229, 98238, 98247, 98256, 98265, 98274, 98283,
98292, 98319, 98328, 98337, 98346, 98355, 98364, 98373, 98382, 98391,
98409, 98418, 98427, 98436, 98445, 98454, 98463, 98472, 98481, 98490,
98508, 98517, 98526, 98535, 98544, 98553, 98562, 98571, 98580, 98607,
98616, 98625, 98634, 98643, 98652, 98661, 98670, 98706, 98715, 98724,
98733, 98742, 98751, 98760, 98805, 98814, 98823, 98832, 98841, 98850,
98904, 98913, 98922, 98931, 98940, 99039, 99048, 99057, 99066, 99075,
99084, 99093, 99129, 99138, 99147, 99156, 99165, 99174, 99183, 99192,
99219, 99228, 99237, 99246, 99255, 99264, 99273, 99282, 99291, 99309,
99318, 99327, 99336, 99345, 99354, 99363, 99372, 99381, 99390, 99408,
99417, 99426, 99435, 99444, 99453, 99462, 99471, 99480, 99507, 99516,
99525, 99534, 99543, 99552, 99561, 99570, 99606, 99615, 99624, 99633,
99642, 99651, 99660, 99705, 99714, 99723, 99732, 99741, 99750, 99804,
99813, 99822, 99831, 99840, 99903, 99912, 99921, 99930}