How can a split a number into unequal parts?
-
Need help from a math guru...
Say, I have 100 and I want to split it into 10 parts that equal 100. So instead of 10x10, I want 17+3+8+12...etc...
If anyone knows of a calculator or excel formula that could help, that would be great.
-
@irj said in How can a split a number into unequal parts?:
Need help from a math guru...
Say, I have 100 and I want to split it into 10 parts that equal 100. So instead of 10x10, I want 17+3+8+12...etc...
If anyone knows of a calculator or excel formula that could help, that would be great.
Is there any sequencing or pattern to the values other than they need to sum up to 100?
-
@kelly said in How can a split a number into unequal parts?:
@irj said in How can a split a number into unequal parts?:
Need help from a math guru...
Say, I have 100 and I want to split it into 10 parts that equal 100. So instead of 10x10, I want 17+3+8+12...etc...
If anyone knows of a calculator or excel formula that could help, that would be great.
Is there any sequencing or pattern to the values other than they need to sum up to 100?
No, I just need a specified number of unequal parts. The number is actually much larger than 100. I am just using 100 as an example.
-
@irj said in How can a split a number into unequal parts?:
@kelly said in How can a split a number into unequal parts?:
@irj said in How can a split a number into unequal parts?:
Need help from a math guru...
Say, I have 100 and I want to split it into 10 parts that equal 100. So instead of 10x10, I want 17+3+8+12...etc...
If anyone knows of a calculator or excel formula that could help, that would be great.
Is there any sequencing or pattern to the values other than they need to sum up to 100?
No, I just need a specified number of unequal parts. The number is actually much larger than 100. I am just using 100 as an example.
So is the count of the values adding up to your total always the same?
-
Random number between 1 and 100. (n)
Random number between 1 and (100-n)
Repeat. -
@jyates said in How can a split a number into unequal parts?:
Random number between 1 and 100. (n)
Random number between 1 and (100-n)
Repeat.This could potentially produce the same number multiple times, is that an issue @IRJ?
-
@kelly said in How can a split a number into unequal parts?:
@irj said in How can a split a number into unequal parts?:
@kelly said in How can a split a number into unequal parts?:
@irj said in How can a split a number into unequal parts?:
Need help from a math guru...
Say, I have 100 and I want to split it into 10 parts that equal 100. So instead of 10x10, I want 17+3+8+12...etc...
If anyone knows of a calculator or excel formula that could help, that would be great.
Is there any sequencing or pattern to the values other than they need to sum up to 100?
No, I just need a specified number of unequal parts. The number is actually much larger than 100. I am just using 100 as an example.
So is the count of the values adding up to your total always the same?
yes.
-
@bnrstnr said in How can a split a number into unequal parts?:
@jyates said in How can a split a number into unequal parts?:
Random number between 1 and 100. (n)
Random number between 1 and (100-n)
Repeat.This could potentially produce the same number multiple times, is that an issue @IRJ?
no potentially having the same number is not an issue. How do I produce n? How do I make sure all the values I pull equal the total value?
-
I solved this by hand. I just started adding up random small numbers with decimal points until I got to 100. So I have like 24 numbers that are completely different and add up to 100. Then I am multiple my starting value against each percentage.
Sometimes doing it by hand is just the easiest. It isnt something I have to calculate enough times to warrant automating it.
-
@irj said in How can a split a number into unequal parts?:
I solved this by hand. I just started adding up random small numbers with decimal points until I got to 100. So I have like 24 numbers that are completely different and add up to 100. Then I am multiple my starting value against each percentage.
Sometimes doing it by hand is just the easiest. It isnt something I have to calculate enough times to warrant automating it.
If you ended up wanting to automate it you would just set a second (potentially hidden) column that is a sum of all the columns above it. For example H2 would be 0, H3 would be =sum(b2), H4 would be =sum(b2:b3), H5 would be =sum(b2:b4), etc. This would give you your "N" for the above formula.
-
@irj said in How can a split a number into unequal parts?:
@bnrstnr said in How can a split a number into unequal parts?:
@jyates said in How can a split a number into unequal parts?:
Random number between 1 and 100. (n)
Random number between 1 and (100-n)
Repeat.This could potentially produce the same number multiple times, is that an issue @IRJ?
no potentially having the same number is not an issue. How do I produce n? How do I make sure all the values I pull equal the total value?
Let me clarify for him.
Cell A1 = 100 (or whatever your max # is)
Cell A2 =RANDBETWEEN(1,A1)
= Generate a random number from 1 to A1 (Son
is the first result of a random)
Cell A3 =RANDBETWEEN(1,(A1-A2))
Cell A4 =RANDBETWEEN(1,(A1 - SUM(A2:A3)))
Cell A5 will be the same as A4 except you will change the A3 in the SUM to A4.
Repeat.
I am too out of practice with Excel to recall how to automate that bit about using the SUM only to the row above current. -
@jaredbusch said in How can a split a number into unequal parts?:
@irj said in How can a split a number into unequal parts?:
@bnrstnr said in How can a split a number into unequal parts?:
@jyates said in How can a split a number into unequal parts?:
Random number between 1 and 100. (n)
Random number between 1 and (100-n)
Repeat.This could potentially produce the same number multiple times, is that an issue @IRJ?
no potentially having the same number is not an issue. How do I produce n? How do I make sure all the values I pull equal the total value?
Let me clarify for him.
Cell A1 = 100 (or whatever your max # is)
Cell A2 =RANDBETWEEN(1,A1)
= Generate a random number from 1 to A1 (Son
is the first result of a random)
Cell A3 =RANDBETWEEN(1,(A1-A2))
Cell A4 =RANDBETWEEN(1,(A1 - SUM(A2:A3)))
Cell A5 will be the same as A4 except you will change the A3 in the SUM to A4.
Repeat.
I am too out of practice with Excel to recall how to automate that bit about using the SUM only to the row above current.Google told me this.
=SUM(INDIRECT(ADDRESS(1,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN())))
So the new formula for cells A3 and onward should be:
=RANDBETWEEN(1,(A1 - SUM(INDIRECT(ADDRESS(2,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN())))
-
#!/bin/bash echo "Enter Number"; read -r num; answer=$(((RANDOM % $num)+1)); newnum=$(expr "$num" - "$answer"); total=$answer; string="$answer"; while [ $total -ne $num ] do answer=$(((RANDOM % $newnum)+1)); newnum=$(expr "$newnum" - "$answer"); string="$string"+"$answer"; total=$(expr "$total" + "$answer"); done echo $string;
Doh, you need a "specified number of uneven parts", not just a random assortment of numbers that equal your original number... Could easily modify this script to do that though
-
Here's your script to specify how many numbers to generate
#!/bin/bash echo "How many numbers to generate?" read -r quant; echo "Enter Number"; read -r num; step="2"; calc=$(expr "$num" / 10); answer=$(shuf -i 1-$calc -n 1); newnum=$(expr "$num" - "$answer"); total=$answer; string="$answer"; while [ $step -lt $quant ] do calc=$(expr "$newnum" / 10); answer=$(shuf -i 1-$calc -n 1); newnum=$(expr "$newnum" - "$answer"); string="$string"+"$answer"; total=$(expr "$total" + "$answer"); ((step++)); done answer=$(expr "$num" - "$total"); string="$string"+"$answer"; echo $string;
There is a chance that you could generate a random number right out the gate that's too large to allow the number you specified... you could just rerun the script and try again at that point
-
@bnrstnr said in How can a split a number into unequal parts?:
There is a chance that you could generate a random number right out the gate that's too large to allow the number you specified... you could just rerun the script and try again at that point
Same with my little Excel thing above.
You could add checks that the result of each line, when divided by the number of remaining results needed is greater than 1, thus ensuring that the sum will work. Probably missing a step in that logic.
-
@bnrstnr said in How can a split a number into unequal parts?:
#!/bin/bash echo "Enter Number"; read -r num; answer=$(((RANDOM % $num)+1)); newnum=$(expr "$num" - "$answer"); total=$answer; string="$answer"; while [ $total -ne $num ] do answer=$(((RANDOM % $newnum)+1)); newnum=$(expr "$newnum" - "$answer"); string="$string"+"$answer"; total=$(expr "$total" + "$answer"); done echo $string;
Doh, you need a "specified number of uneven parts", not just a random assortment of numbers that equal your original number... Could easily modify this script to do that though
I love it! Thanks.
Yes I would like to be able to specifiy the number of uneven parts.
-
This is what happens when you use a big number... It ran for almost an hour lol
It works great for numbers less than 500, though. If I could specify the amount of splits, that would be great.
989+9009+27398+15525+4026+25066+18722+23484+32406+14537+7968+27403+12507+23756+13474+3623+10427+27418+25451+2326+1877+21554+5074+17217+20414+16932+13117+27005+9252+9928+31981+8340+19800+21323+20002+7178+14417+20178+22092+8473+32229+18587+17519+25155+3406+25727+12054+14564+27958+25781+17228+12684+18728+22861+26598+7262+28438+4838+13206+22609+7530+11681+9811+3065+27424+31279+10885+26881+8211+20571+26484+27990+4610+10139+6589+12563+23716+9828+2855+14217+25091+15141+952+14676+18748+25123+28986+148+21422+12114+18454+32375+10163+27089+12431+2452+16050+8243+3786+30814+18482+17662+30061+21072+2890+10071+10516+28582+23806+5213+27291+31327+28200+27873+16041+20404+7284+30414+13178+29137+23777+4976+7546+4175+4664+31196+14177+17567+6313+4110+6912+7162+13271+26852+14672+8718+12065+7955+32481+19354+23976+19160+13959+17970+31351+6266+30287+18507+12182+10617+19667+12161+7282+6403+5791+11171+19890+26845+5782+18848+14195+27067+26551+5049+27356+32601+13012+28606+7353+15020+23104+31973+8641+3880+29361+21379+20148+6868+23566+10994+26015+8239+31290+25462+19015+5324+24088+23090+9595+13418+8028+15260+25361+26332+29685+16226+16160+13089+19480+11587+4257+17179+12427+26195+19264+27100+18093+25954+887+30422+27073+1439+9166+2092+25007+16397+10971+28957+12706+32688+23364+24071+32045+96+32251+20511+2850+28376+1101+18200+25983+23671+3030+155+8559+24251+16461+29051+12345+25535+29149+19107+32068+30198+21156+4123+18869+1139+8393+55+10799+21981+456+26181+20452+24224+25616+22994+26092+25124+10697+24889+29027+7039+4396+21057+16261+6799+4382+25245+13127+634+8190+30025+2012+30855+22373+9515+3908+9401+32654+24457+30695+17499+8574+28893+9512+25204+7511+17853+27745+12834+24924+25661+21132+19153+20855+26865+3413+11099+16226+10086+10537+11444+19700+4463+4352+8803+30316+16070+14085+14940+31901+3465+6281+24503+22412+3932+24752+23387+17778+14154+23997+7959+13123+25845+238+2143+29296+9419+992+28478+16121+20375+16410+29548+15710+30995+22662+16837+25876+4177+4282+10916+26423+20534+7734+19833+9416+10754+1013+14631+12816+9241+21558+7088+14656+10133+16476+24834+14905+25795+19350+31784+14045+21888+13229+1691+15676+5937+3835+24603+31232+9259+24437+30239+437+31545+27112+28857+31377+10272+12699+11153+9452+5504+29463+21882+10718+3283+23415+25204+14928+15929+6456+3108+28061+28306+4199+22061+6855+6675+19685+11166+5964+3233+12405+24547+18685+24905+4261+9152+6622+8863+1487+24541+8973+11766+23736+14098+31764+27879+10600+23555+13784+1908+15871+14696+22126+13879+26785+9647+380+21600+21182+5455+24826+20475+24419+24484+32079+17280+31263+1269+32392+5190+23417+18181+13191+31091+20483+2131+31134+20506+22223+18354+3091+19456+9532+3961+27578+1925+14788+25056+12565+15526+11646+9135+20575+1530+20796+19559+4158+20397+32607+6215+25950+1594+20398+3684+11001+19088+19336+13162+31703+22140+26255+9211+8266+26678+9350+15226+20341+26298+19960+27133+28953+5623+31727+31993+20032+13447+6749+17971+7193+14448+20230+9317+16351+21618+2495+18845+30139+18832+28688+7412+14337+17803+3191+23904+19747+9336+19901+10334+16677+23002+22901+11399+14142+18519+10955+21331+856+29210+249+22591+6937+25663+30552+15447+39+32018+1444+21547+21753+10020+10990+28622+12368+25078+24544+20409+24195+28840+6605+28228+17432+3988+18248+21835+15222+14301+4327+6099+13462+22239+17646+132+18001+22991+11859+10163+16929+3778+16488+22573+2594+12796+4153+9885+5701+8331+1893+27865+4006+21072+27171+2105+18442+27726+26043+23096+29206+30416+17892+6201+16000+17624+13899+25040+2927+15116+1204+12464+2926+32229+14549+6852+8213+24258+9812+13682+20738+25248+29697+30039+12447+10549+15937+13260+11838+22247+18294+5888+1432+21794+6712+22594+15674+8304+11945+25713+21273+32397+29029+5241+1051+26481+15143+25473+9895+636+4601+29203+18617+25483+11165+26532+23415+15656+9952+9830+21384+5590+192+12870+32595+15337+19421+13807+23894+16414+2043+23659+20984+28101+31679+6402+19448+9059+21430+21957+29317+31313+23444+16586+10532+25368+21087+19867+22625+19460+10381+23909+10621+10309+16804+3333+8477+1202+21772+408+6838+4257+21700+28321+3238+24744+12528+30368+15+22825+6779+23698+21350+16800+21595+4299+26712+27211+18440+2490+2681+28649+11218+1106+10002+28111+5359+24039+27496+302+31460+32058+1224+19501+39+28531+30126+31418+25361+28441+26352+11435+29180+13434+17491+9686+25959+24157+7481+3408+25807+16941+29745+16843+26580+4329+4712+20895+1872+29031+15359+27305+5733+19870+12352+13395+6438+10790+8866+12837+2067+9890+15814+4570+24907+250+8820+160+99+29477+24160+20378+27987+20540+7147+31943+19847+20400+15154+11177+32421+26887+22433+32415+25489+19896+18104+29735+5096+18700+10648+7886+27122+27299+24723+26388+19809+3949+15466+17389+23046+20986+21125+12445+6575+10831+11186+15537+5975+23383+6279+14859+7459+20415+3731+24037+16719+9418+14522+18412+24862+32183+31670+22229+14010+29791+8903+17244+12496+3549+8691+29696+12511+5461+31620+4122+11872+5169+10503+6275+10100+19279+14700+21432+22970+18949+10193+30980+24175+16425+22256+13746+8062+5816+706+30114+26506+9857+16221+24284+19109+9653+2617+12823+30636+21543+16031+15697+11527+8687+24196+6676+853+20654+26137+32160+2665+28415+5336+32251+26670+7538+7831+14215+857+17554+19429+12661+21840+25574+10141+10661+5940+22778+25144+22908+18935+28376+13607+32626+29048+26086+15951+18004+12842+18940+12831+6083+28035+3888+29971+16124+1156+24625+8040+17297+27527+19545+31447+15499+25413+13319+11217+15756+9569+3194+32453+8554+19384+11604+27744+12012+30112+18246+24704+32767+14233+31056+32276+27365+30640+13653+18129+14528+23869+22438+12593+29247+7769+28719+2189+18954+16169+8443+9236+2967+26980+6180+20882+19785+27011+1083+11902+18224+5957+5705+11800+6341+2806+1001+12752+20164+14851+1635+16012+15783+12315+9613+14281+30571+7153+32070+1472+25904+5903+15200+8107+11272+16503+16313+26251+7341+12654+17488+17015+1804+8652+25684+17119+9107+30854+641+21190+12080+26741+25168+30341+10778+28149+162+2328+30826+29700+12938+28495+14886+2215+29185+14127+20291+10042+14991+440+20790+7199+15293+27403+4088+19741+13097+17827+20818+27674+12978+9832+3764+18330+17978+4088+22695+19119+11854+27073+25899+19232+6783+31377+12278+9048+22452+27846+15509+19592+21324+13333+18241+28915+17119+10827+9734+20318+8905+5612+19474+11251+24591+1612+25526+17592+10357+1844+26742+507+3228+17182+23168+27619+26504+3773+5826+10250+12499+23657+28113+12032+10639+21248+6192+27257+12075+5571+7750+1092+3121+27996+18380+14006+26757+27179+17393+31710+11047+5799+5368+6969+18775+23368+23718+10884+15548+15211+22052+19669+11049+3777+11822+16068+19527+23265+31445+18292+8003+32427+30768+1567+22461+12504+8050+1942+28895+15755+29586+21103+883+26232+26418+1524+21209+5775+8643+26934+28840+1956+11287+30104+23335+18101+12263+20963+32009+27748+2403+9344+22895+26173+9201+13003+9717+25096+24819+31383+13081+10401+28612+3623+14343+26652+4482+1129+370+26916+21865+27074+16941+2665+20563+28521+20188+10578+16238+11979+2254+7377+16962+3294+23045+22788+3751+26711+16072+11484+3749+2359+21696+2263+22869+16224+9758+23341+23081+16660+28193+11634+30333+1283+29254+20911+19508+22729+28606+15990+8404+7389+30679+8715+227+7130+25543+9173+28254+30102+23615+7008+17577+12530+16071+28774+13576+785+24599+31719+27988+6927+25412+4467+6030+247+17173+3391+12947+15371+29393+24884+32332+13398+24361+31357+15170+23533+9911+18207+8992+28198+26489+15426+29698+10668+25637+12725+29839+20722+18684+7950+25305+30954+15267+14094+32660+15998+16083+1173+12220+31372+26042+7827+21546+6873+11527+11763+17504+22596+17510+5680+6982+9228+2084+902+26350+3003+6989+21606+30521+23138+25558+31869+30562+14978+14390+17194+4855+3283+25134+15302+9110+26803+11004+25502+6436+9634+14810+30138+26989+27907+18397+2543+17543+22252+3044+11471+19836+26331+17646+23488+3687+32319+29558+24659+23413+18936+5507+16738+27849+28320+17888+28622+12371+6955+1988+21888+19622+9459+23562+10780+139+13216+25409+12450+19830+26763+23597+421+26000+25014+24776+24225+4643+8393+27546+17857+27016+29868+16868+28901+21468+3395+4597+22474+1998+25440+5068+15104+2663+31574+23940+2718+9182+21436+24381+32497+1900+23847+16188+30180+15994+11088+28036+629+23097+15901+32396+6946+14451+28107+14591+28682+6614+9505+32068+30373+15923+6693+27324+29976+26387+4363+32576+20652+13407+23950+12633+9457+12927+7078+19054+5300+19147+20724+17665+11722+6551+29939+32256+4570+855+19085+893+4814+5345+21804+21059+6456+3311+1124+9936+12421+20477+20476+15173+8571+11256+15034+27273+24784+28629+31173+3331+21384+27185+9799+30660+32258+13036+6482+27150+20646+19478+9730+22511+7448+6237+25022+1059+4758+10199+8753+13121+25524+11277+2906+18376+32592+26911+30719+31847+13207+24573+17898+25626+21041+820+20525+7282+2562+28580+4220+15947+16345+12675+29291+23547+21140+1487+22167+16286+31621+17742+2332+27696+10215+12908+25976+1109+19529+23841+12167+19878+15589+27952+25998+24307+32672+26902+2664+20181+28806+25039+30609+22031+3814+31861+23484+11993+13373+9344+25069+31985+9920+27284+3184+3337+19716+12216+15536+21096+6677+23677+11860+30006+12600+27286+517+2839+8689+16867+31558+17707+31834+3637+13729+20480+5698+9520+29863+30113+7132+508+25551+3263+20208+19167+8+6506+4239+13541+1893+4273+13526+14611+28582+30908+23053+1817+29343+8222+8795+8161+24393+9777+14543+11196+18592+26803+17129+22606+19174+20023+4266+32075+17411+7021+7713+4985+28376+15025+17405+4571+19331+7287+20077+19519+12411+19005+31852+181+347+32243+23279+23972+17146+12209+3491+16778+9860+2445+422+13282+21323+16102+30274+31124+30253+28928+17899+18877+2343+15539+29255+6155+667+28765+23146+28250+20839+11701+10511+31776+7464+3358+15368+9832+32764+24351+22415+23584+6908+6461+2889+19269+6848+6865+900+21410+5567+8963+3929+14259+19800+15753+24287+7440+582+14554+3265+16271+23618+30428+30790+15927+29483+1598+16259+10197+9657+3058+10776+32196+27033+10479+26056+7796+23515+8158+1209+9978+25030+8731+4617+27375+21551+24183+14759+28111+10860+11492+10777+16817+11472+28569+6272+30217+19280+31720+13843+31438+26594+15542+19980+31058+23459+17818+5994+4208+9301+22894+12002+29401+29935+21830+21188+23910+13545+12175+14284+17950+30680+1548+5283+25745+29651+12049+3929+9457+14012+507+1928+20571+25822+15948+22248+32508+21679+15358+11425+27164+16463+30349+10825+12053+4537+8252+21008+4594+10458+4692+14463+30039+14724+3749+24590+9848+8808+19614+7222+4609+27434+28463+30680+2230+25843+6050+32668+15173+3717+10918+27854+19180+15484+31991+13001+6310+18731+3051+19815+12575+26556+31057+5540+19789+25304+28434+7821+11909+7137+19100+14279+28491+6749+18006+12181+23411+29855+26417+23441+4977+24886+10421+29733+16318+18184+29472+6832+30179+6423+11407+21790+6432+27248+30423+9292+32137+3248+3896+4842+8398+18846+1930+25900+16898+6256+29751+24962+11878+7494+25413+12643+24257+15100+24541+8382+1079+9781+25658+13373+30504+27479+8415+31561+21509+4213+22097+15373+22947+17527+26403+11177+29726+16054+926+1146+30375+18516+5264+23531+14076+28935+3329+22741+6975+16868+30349+6094+16241+7218+5141+2804+11246+11338+2921+13850+27289+27395+28912+14411+14585+29545+20644+16851+3575+26819+20622+10488+3654+5558+20686+7137+20548+11836+17312+21689+20279+1744+13843+4555+15476+28208+5624+13865+19998+5593+14723+9884+18059+22539+14831+23625+10122+18260+24129+30700+2590+12364+13056+14203+22389+15474+24522+15390+12891+28508+29694+1895+1657+31726+24302+21677+1676+27193+10689+13584+17231+25744+16574+4075+1603+8511+3061+2215+6776+20873+25723+18390+17187+14151+29741+19733+9386+29046+30283+12713+19101+501+3642+802+4362+8287+13869+16970+1953+30636+7410+23095+19037+1976+17308+10996+21922+4890+31588+24299+31095+2749+946+31555+26884+3134+17360+240+5378+15864+23548+30222+2016+5641+7060+10433+10622+495+26298+18221+24208+12068+19871+24275+32609+18177+11465+7135+15113+10107+24874+341+26747+30218+7636+11174+11994+19491+8213+15912+17487+32700+10584+12895+3229+29384+13321+9820+27550+23366+15560+24337+14533+10625+15749+25544+22121+26561+5392+19329+1094+4222+17168+10925+16900+8341+29273+17206+29996+9708+10779+24549+14919+27602+16826+6164+23524+16025+4353+27666+6134+1307+14428+4918+16924+15483+2816+12940+652+20162+13980+12116+16192+26297+27199+20835+20990+30373+19269+8069+15103+15218+9393+22109+24190+3255+16714+24066+18141+19483+5518+7988+1376+20659+13080+2064+18994+12503+23656+18038+25351+20119+3911+29336+26255+5692+9527+13039+22551+27284+2057+8400+7455+17130+906+24775+17589+15397+6974+26536+21624+1198+19170+6926+13376+17753+19787+23666+20531+15501+13208+20725+26197+28934+22944+3960+7074+11453+9652+25208+18916+8158+1450+22510+17094+15737+28723+7180+25741+16813+20658+19655+1847+18457+25375+30862+16289+23941+23905+4688+7611+21825+796+4988+8903+7331+10299+6783+32080+30139+12790+27695+5400+20985+17930+13728+11742+18019+2018+7953+211+1940+5190+5897+25944+22775+9360+31622+12395+7307+30207+21053+13098+4190+2990+16069+25513+21969+1057+32560+16345+9111+29926+2341+25699+5868+26236+23526+25625+11773+21102+10382+32192+15352+11275+2539+11547+25054+12767+9153+18651+1653+23364+24031+23629+20962+11537+18998+12035+20352+16005+30925+27860+21727+3354+1181+30706+16613+30426+17352+6266+24027+19525+9511+7066+7181+11744+26742+14051+28579+18108+30729+11344+15774+20821+12492+10309+12539+7657+9024+10127+4816+2107+23448+18779+30314+3845+10117+9916+30662+29126+25332+6333+32085+22258+9799+23781+20146+1332+12016+28842+8810+21942+14083+7871+821+4279+30764+7139+25654+8400+19305+16035+9266+19750+3687+30048+111+3663+29784+12819+2146+28956+26999+501+29675+18975+13964+6001+29165+6938+18806+19324+17824+26213+1619+4835+23471+13199+21612+5333+7827+18736+22516+22055+400+30737+3796+31864+16217+26338+32184+8662+24364+8353+7074+10723+22117+26389+11197+30404+14696+23065+3767+27660+28547+171+15981+30271+5540+11176+15409+4254+27851+31918+4273+23940+26242+24169+11440+25649+10850+7740+29835+14994+10600+20096+7831+14865+6926+15859+11591+29025+9507+30949+28633+32216+24851+3469+14713+17508+4883+9316+4779+558+12648+32372+26155+1357+32348+14937+6135+17248+18551+2153+9548+7158+4949+19469+29261+10528+2217+3011+12353+31015+25012+23074+24418+7547+3012+19538+7888+18272+23098+9335+26537+4618+11437+2887+27803+9261+25342+31652+24502+6018+22886+14443+31545+30463+22444+14820+16212+1869+15730+671+29269+8692+9825+17980+10286+30761+17136+1269+2574+3474+22513+31086+9546+13676+23995+12026+7123+15187+23563+29073+28107+7936+6771+24003+13167+19769+16322+19139+10064+24037+25059+5222+7847+25608+13593+31877+31179+23485+16557+32490+17245+32292+1190+15155+30951+26737+16452+17271+13394+31754+27563+12449+620+27760+11399+11995+10839+13322+27266+22898+25071+4918+7668+4659+17507+8290+30066+5220+17675+15180+247+26254+28068+12437+8856+6058+3414+27412+278+20617+14169+8897+8255+25735+24709+11498+17838+6818+2082+21447+6855+31481+331+18794+12736+11134+25908+8160+7048+103+19303+14985+30173+31173+24714+1064+23964+17250+24058+9547+27921+32726+15225+30768+645+26447+32127+13057+24938+23709+11646+12590+18791+26410+3624+16527+23793+11813+32168+32491+1309+6722+22297+1527+1856+25042+5944+14910+21947+21885+7635+7689+25149+30097+6401+5861+28780+21679+18071+24752+20384+3392+17630+15749+190+5552+27827+26954+27039+23119+3100+4756+14218+20250+17452+5958+2336+10682+25074+29562+10996+32586+20381+25850+28596+30915+20507+6260+27419+21112+18381+30463+28164+17504+887+23163+12650+4066+8861+709+22462+26492+23306+1322+1178+6692+19457+19612+11311+21771+24931+13118+5716+17011+30487+25557+10412+18368+7425+18303+16000+16054+599+6317+25381+10732+11457+10689+13128+21353+10466+848+28318+24232+20132+2358+9129+10578+25241+8608+3435+1812+12355+3299+9785+19630+5682+2578+3208+16418+26700+26053+17686+8315+24226+24751+28542+11231+12599+1246+2077+6195+10050+30400+16521+25270+2777+12840+16594+31934+6347+18422+18447+19167+1610+17056+4227+7361+21509+10209+5222+9082+13075+5428+9519+9545+14519+3905+2715+22841+13145+11988+16094+23089+11462+878+3044+10988+1678+24719+11762+1601+1026+14691+9131+10377+20397+27098+20527+20775+25728+8174+21304+25242+29149+20447+8637+31437+3033+27349+20892+27620+10626+10663+3274+15373+31603+19429+8631+2500+15245+14983+632+3719+18912+4056+8954+20243+21785+28332+22908+23725+28191+12028+3980+14604+24075+7641+2080+31767+23154+27095+11929+14983+29199+17188+24968+14241+17888+2172+2426+1984+27000+14890+3155+10711+29789+5063+1086+24380+20859+28612+11739+31163+30926+3939+14866+31941+17967+11182+5276+28629+149+18305+25191+21316+3809+28120+29092+22213+13546+24257+14556+20504+28223+25472+25114+4969+18987+12451+12177+27475+5628+14905+26873+10234+771+22166+11662+15408+24022+2226+19159+22825+7423+17719+32733+582+18633+26658+4338+5740+32545+27152+19318+6766+7216+32198+24944+1765+3416+3098+4243+3849+30714+6938+10276+21066+3634+3165+6917+18514+404+11872+8556+9078+31450+25665+25550+26367+28777+3591+22522+30499+2961+20675+13063+6682+12464+30707+23105+22154+30234+15095+6655+10770+5822+32672+30421+5714+25812+30633+30440+23299+8704+5796+31356+16623+5407+11764+20402+6492+20648+12402+512+24228+23423+28761+17459+1837+5579+19130+21981+13289+31127+3750+19394+14887+13743+29781+5150+10440+25955+10807+26544+20974+20678+23477+13276+14710+32364+17032+26376+8130+748+14831+32238+28638+26424+1389+12838+19803+10607+12815+30275+13418+197+27125+19983+15177+10667+11714+30761+19217+19642+18722+16727+20511+702+3455+2733+29554+10962+23601+1532+27324+15548+24654+9468+8357+6914+6660+3109+26682+14136+14469+5116+8364+23374+20530+32368+21811+27383+3780+23461+18801+6997+18574+30621+17398+16056+6683+29642+15391+29661+17058+6718+18544+9782+12002+4267+21691+9209+6632+22202+19968+27614+18340+17122+26513+17059+21863+25987+2688+28414+25066+24072+19495+30015+29013+25157+10647+23998+27622+17506+26358+5621+28254+23391+8035+8749+6678+10846+3591+22068+27715+5168+29587+10981+6824+567+32402+32502+13116+11698+1797+24003+2192+14537+12070+21354+17472+12294+16069+4712+24569+19628+14530+17995+25871+6659+20139+15458+22557+17747+25020+31095+20718+12377+8082+16295+22829+1704+6674+30078+10697+12966+5502+3308+21460+5331+6810+29986+32689+18459+25857+15524+16553+442+21813+9711+26279+28538+6547+24892+7653+5028+4137+21430+17933+6499+8641+31245+30179+2318+22649+30637+4095+9621+27190+6336+23408+30221+18187+1524+14386+15790+20596+32000+2457+14142+22131+1443+11533+3710+30080+1564+10251+695+22055+2681+3217+32139+4063+32514+21781+16091+14577+25046+9270+27865+1811+30889+11758+30684+4613+32552+6126+32131+15488+27080+17539+784+2846+21945+29474+19330+12875+19013+25087+11289+8007+19093+32174+17484+24720+9300+8647+5868+16724+32159+12472+849+10064+3952+3198+12326+7877+10420+8531+20033+28997+32760+22188+15410+25637+6804+27349+15110+26126+5894+7326+23970+5192+5092+28588+26501+22485+28734+4505+19061+17923+2318+29954+17229+1028+830+20939+26472+22484+852+31278+29631+23878+603+475+22741+26960+28908+763+10207+5896+32135+5602+12940+4410+21099+1462+19470+17503+18173+1104+129+10909+5827+29278+22809+3383+30993+16371+25642+2513+28763+18001+31890+23696+26700+22158+4536+12679+4491+22441+31974+31793+26993+30215+24634+23265+31756+23559+17258+31334+19245+32389+19970+26473+6368+1234+30124+31936+12155+15607+23446+24176+29392+11840+19011+1814+13821+26770+17755+29093+6762+16467+32428+26030+24034+2633+15239+3487+21019+23502+11723+31528+25345+21414+14804+27055+22101+27642+26814+28770+6902+1982+23453+10125+3796+3023+15400+28733+12266+15188+7459+18187+10275+1130+24834+19846+4121+27468+25627+8355+11620+26618+24187+15802+29793+1689+11340+5323+12563+25922+21511+1590+9294+3170+23922+21621+11905+6571+1976+12647+16539+25778+23738+12671+30781+28377+1272+4502+32273+9394+6018+29611+20468+14597+21411+29734+2+3233+8115+32453+17615+2775+13152+28612+3231+6059+24157+13176+29510+123+27629+139+16474+14315+10589+30162+16168+23617+17253+1777+16614+9521+19634+8160+11370+30835+18388+17912+5893+9484+21108+20264+19430+27542+9116+17527+30868+22186+16614+16581+18724+18099+2223+31376+2282+19360+31711+31487+28515+21745+2846+21448+32088+7431+17333+2533+13851+5638+19809+3481+17926+10045+4112+28606+8623+18691+31176+9630+15124+31666+25129+1075+4328+30783+1785+14632+2372+12563+19333+25985+25223+8798+21056+18800+27800+30619+22262+4140+9832+3311+4329+12912+22609+9598+22367+7665+8921+15519+32262+18312+4876+1931+6134+7159+28494+18099+32610+5089+9721+28146+11633+26237+8164+3937+17593+25224+22822+17152+11127+6998+8037+805+21859+21606+2176+30925+14357+30653+31815+6203+22167+28440+30651+30949+28733+9270+14564+32094+7479+30422+16266+1361+2341+17933+31188+18360+28661+17188+27434+1275+30654+17323+3219+4397+3634+1959+27916+15217+29428+26985+30604+3942+20209+13462+25835+31503+3337+24297+5369+19910+31777+18275+6864+25132+5080+10995+6114+29389+30825+20647+3634+57+3428+12586+20689+24778+22765+4696+26158+12783+7750+4685+2333+20990+23197+957+21421+31836+3419+19322+10463+13912+23154+28448+31549+25038+11575+26417+10937+16413+6539+32645+23254+8750+23151+4413+12944+7539+597+4103+20502+16212+3136+9067+23290+20476+4437+31399+31101+29675+21725+29683+17662+32618+2452+15508+1610+337+29338+24947+14428+13698+27663+12331+14151+7014+10047+7694+1281+24953+20975+12440+18644+18528+8236+7846+13234+23480+525+2708+22855+23741+2910+9951+30602+3411+15966+3427+24183+13034+104+12269+369+13228+18834+28867+4879+18497+7964+25228+27987+16992+12872+5740+5934+25816+5312+15691+29362+24732+6828+7798+21377+6606+8105+8707+24685+7174+26887+22451+2141+29971+8324+10271+512+13159+13512+6435+24067+9481+22047+2985+6251+9613+21949+25601+2026+5210+8275+14786+25137+27526+17389+23819+27271+17299+27328+29346+27381+1303+7035+7311+281+9826+30657+3121+24714+4598+6243+399+15543+9540+29187+7422+17746+31593+5017+2695+611+8846+4265+12170+3093+4967+21193+29171+4252+1429+25143+28497+15274+10654+19384+12759+977+3334+24964+2456+16652+26045+22390+4593+31864+11845+11389+13849+6452+4183+14375+6530+1361+977+5271+13051+30066+4957+10438+22970+16882+3817+25118+580+13020+28448+7860+19544+1588+13002+29238+10255+23597+27650+27536+6541+27215+1065+2005+6112+23609+3315+10725+1102+5242+22690+31677+14392+22135+6601+26069+25072+16254+19624+5382+8062+5347+18693+22036+12991+13182+7787+24364+20266+17720+15115+11453+14478+21390+9549+24615+1960+13240+21827+10483+27474+15269+12358+10884+7976+2427+30705+28587+14747+25664+15157+12037+23860+25285+27125+27154+21441+10393+19369+23233+11213+3540+21804+22147+14529+29164+17873+12039+21032+9249+23814+13008+3219+30354+28242+14721+15741+25063+32734+15062+10606+1495+32031+24450+21228+482+31795+31485+30009+29275+17335+6169+2627+19396+17436+28928+19156+7955+9607+10437+32277+10054+19202+32565+30738+25952+5886+548+28899+13358+7971+5346+25301+946+3931+11041+25651+19424+25734+8731+4984+2162+30438+2174+27536+6176+21374+26415+13174+1925+4639+5134+9923+12938+3014+31752+27434+31966+15709+4114+1054+23578+17744+32716+1564+5358+29020+14965+21671+9863+19092+12176+7106+21344+24463+2448+24305+31825+3630+27751+22082+26711+1046+13760+14516+9899+9729+1028+10053+4341+21039+3960+30611+12575+25224+24265+18187+12292+18979+19456+29129+11144+31204+25820+17235+683+5635+32177+22676+14800+31497+26929+8339+31893+11053+7227+24992+26569+18485+1027+17788+15267+16232+11933+15027+11130+21322+13034+2433+4331+5715+10578+22924+22520+14914+22699+9578+19185+6667+12369+1673+6346+25334+1792+6946+13155+15086+28928+7651+6374+10722+11675+32153+11790+2308+25064+11229+19638+16693+31439+3754+14209+27767+24676+21904+22047+10717+21642+17269+19509+3775+800+13535+32347+6553+31256+9082+12322+27498+2545+7728+23125+1181+29912+28553+10080+5662+4769+5856+26364+16007+2493+19853+29015+4744+8755+24026+28673+13005+14885+20470+14101+7770+17222+2425+32606+27941+1240+6379+2133+7232+12815+30653+1085+8423+31483+27630+25267+18849+21179+28281+14890+3752+4989+22658+16911+23493+27005+502+7656+23671+3670+19206+25011+14684+11629+27742+29301+19114+25296+14613+31681+13882+13011+15956+4030+7401+25798+7594+3337+21060+29291+11706+29091+31773+16601+31779+17189+8398+16150+10934+28419+6079+24305+6848+7497+4475+15233+9300+393+20819+11570+10712+8752+27017+5773+28171+30893+9349+7407+29558+20994+29752+7281+19629+24058+23073+18011+29171+1590+22327+19138+2664+11214+17327+8797+25349+30577+32423+336+17465+2880+30681+24626+27924+14477+14887+16158+19668+22691+13989+28218+8797+27172+16682+18523+23575+27663+25982+6171+2796+8295+14249+7752+31013+19955+10726+8907+12485+25717+17197+22194+15708+31369+11939+15465+30789+3313+2690+27702+10839+20377+18618+5139+22573+3589+662+12669+25608+12334+8317+22445+6658+4945+3961+19145+14372+12133+1804+10906+32+9608+26627+31641+21981+5532+19317+27246+23548+29793+32729+1456+29288+32729+178+10140+2028+3053+32688+25208+20408+17557+5112+3716+5290+12610+19075+27985+30541+18231+27706+18490+20079+23062+26679+24169+8002+16996+14476+1022+5429+10147+22623+14147+8869+29339+11994+23184+8626+14635+20870+10269+3811+25853+2346+2808+1623+11341+30052+25660+9131+17589+19550+6692+10709+19054+4471+6262+159+8669+12730+2815+25277+17559+9663+7513+11034+7691+26378+11696+25247+19406+22934+6721+2231+4438+7517+19725+28653+14137+24833+8384+1453+1913+13580+7317+31909+5020+28823+10793+26549+13966+1026+5450+5994+10594+23145+878+6986+10952+7085+4069+1866+29146+6592+31351+13861+13628+26752+9681+7397+2507+19576+26242+18300+3501+24738+4026+28114+967+27575+16529+29984+25954+282+12049+27592+5602+13640+3316+22637+22964+16908+2418+30781+21479+26340+3599+24740+12477+13124+14763+27611+1685+11443+2787+7179+31517+9583+30339+4328+27440+10743+12307+3580+7526+7800+17019+2926+31475+32308+7886+24136+15406+32681+6569+4205+32692+25512+6148+10963+30990+29934+10957+3345+27592+30835+23085+21667+2992+15290+9048+28046+7049+8120+19394+14263+25644+25819+20884+22748+23634+373+5531+31123+10725+26424+7320+6656+32028+19923+20757+11636+10362+24660+18257+12552+31087+27169+14126+13724+29058+30029+29519+17401+3698+24516+15355+23016+32335+22233+10800+9003+17103+11485+24167+10533+13901+1333+14049+23323+23195+27783+6830+4870+32597+5573+13132+15177+6140+6205+15807+18908+4149+2158+32271+31071+23681+1214+24174+4105+15477+12590+7702+16601+107+27807+15370+7280+29937+30074+9871+29111+6590+1341+19922+31781+21649+26469+6024+26916+16073+5794+30356+30367+20062+29364+5258+27592+8700+8559+1897+23782+32646+10617+10672+31007+28730+31435+14137+25735+20027+32671+7000+2991+28339+10997+11884+19873+25392+26871+5726+28656+22521+3295+7192+26096+2815+30121+9329+22264+4268+10153+12247+15656+3651+22269+30836+1774+32125+114+6639+3922+20926+29042+27858+15712+29679+11613+6388+6003+5527+2174+27453+3158+28134+1248+30033+32499+2860+30146+30408+9605+12167+24765+30419+29899+12179+20365+8663+8393+27803+19952+14818+12984+13536+23495+29096+22406+5042+3851+3180+8860+14545+5615+24797+25643+18500+26606+7521+25028+29490+16762+12797+29033+1493+31376+26897+28607+17005+477+21855+23990+16104+28388+15310+13269+20133+10205+6664+2952+186+13349+1212+18793+31409+29210+31671+12423+26049+25798+31782+12242+3639+9669+3163+12755+1473+13391+14066+14386+26568+29449+18253+7299+18777+3017+7706+22225+19090+6258+28608+11277+27289+21945+31700+11072+1544+21737+6069+29827+19386+4208+9001+21886+18102+26802+1412+8683+18264+25529+31368+27727+11632+10199+28700+18459+18273+16605+32406+11572+4593+535+18073+26366+12032+2839+30363+14847+32377+8289+17248+12272+11894+9669+5569+11313+12402+182+10443+16225+4467+10768+1200+18901+6751+24152+17075+32743+3479+10109+30324+18377+21463+23487+13217+31219+7766+2888+2517+954+10297+17767+25056+17592+8918+32694+3756+17354+24299+30945+24238+24017+9067+18131+11392+28428+27357+24178+28990+7189+16563+14874+27648+25560+28006+22555+16009+11605+8285+8422+17889+9442+21108+14714+23613+8995+23376+27970+274+16071+27458+16184+428+13660+11118+12273+27049+17061+21839+9004+8466+13064+13772+184+5159+174+3011+15968+3380+25425+27408+20715+22250+7629+28616+19754+32397+18029+32049+3191+15381+30941+24315+12130+26091+13120+5706+20645+30534+29923+28626+17406+16964+722+3079+13817+1299+11877+31589+14110+10651+3608+11088+32348+9862+6092+27939+11098+4419+10094+8275+3184+32689+8364+6511+11045+3888+7520+32578+17242+10781+13296+26805+11497+31664+22790+9792+9736+16000+13640+8116+31021+28732+32368+30923+20852+9295+15482+28156+8891+5117+11652+9530+32701+26207+26448+10825+10532+3912+16786+27716+27213+29202+5525+25349+22579+23608+31034+20032+22153+8394+18713+3219+7366+6126+7006+18410+12328+7422+18125+16663+22720+13952+32158+3624+23237+13511+25355+18428+27732+3508+4179+5759+27429+9708+3148+23290+21735+8160+16108+27478+28124+6243+32408+4014+22917+9382+7716+13840+23333+23381+11956+10737+3402+21551+23396+24934+29660+24058+9439+11244+4367+29959+3643+20280+31270+16369+24097+10507+29021+5299+23490+32244+8034+18910+9153+15645+18321+25371+26623+7270+21528+1187+31594+22698+31295+7457+29599+25144+16794+19184+15712+24165+9566+22299+6730+22056+14543+12405+16547+32304+4614+20377+17688+10890+20303+16476+24214+21613+8020+16116+26356+13868+268+8734+28557+8531+20977+6785+4540+13989+3907+32443+13957+13583+20659+11028+7685+23418+11334+14843+38+7489+32138+1013+20098+8212+25069+7999+22372+25601+3679+6000+20973+12079+16957+15398+27109+12049+8394+16156+8909+18774+2267+30348+28896+6562+29775+30477+26748+890+9381+25034+10582+17572+23340+13138+25833+1377+16037+17691+32489+31883+1740+8968+21301+16301+23436+23920+28337+7492+25869+17868+24868+24731+26424+30508+24268+3153+6258+21170+11589+381+14416+3907+28332+20057+18022+18073+400+28864+16233+25780+31883+152+30252+22856+32587+11576+5035+20039+12360+8697+28232+16303+1572+9828+29330+24891+23669+3445+32329+20558+6270+25699+10137+16719+9167+30499+10994+21547+15354+1421+23455+5791+7752+2515+27679+29869+8361+16000+22093+28335+14867+14544+17325+1882+8977+11259+24947+8906+28944+20945+26357+26941+4814+8122+18415+2303+2775+10039+8765+18389+2936+278+22134+28607+30927+17806+22999+18170+24934+2155+9313+18877+7202+3778+20108+19918+31441+5060+6614+11420+9923+25803+22450+29818+691+7995+18579+3890+9198+20439+13455+12456+18679+17698+6407+11784+2345+16706+24974+13687+11721+27371+22926+2884+2899+30582+16152+8704+16994+13857+8457+21770+3528+8406+11608+18976+5791+14622+31919+16754+4869+2931+13268+32752+21315+26359+28394+18002+7276+27380+17381+32719+30801+31959+28626+16700+17227+19535+29125+8069+15203+29350+23866+226+1645+23343+29639+5588+5194+1950+3857+10996+31111+4855+9918+5759+32738+12830+20888+22472+349+4657+13409+22805+21380+6647+8160+2629+11271+32708+32710+9036+27742+2667+27383+3135+29440+7418+23214+21537+8261+7004+4759+25346+4979+31521+18777+21061+8394+3601+3360+13946+25208+12176+5662+7378+14555+10916+26048+14744+9720+16954+29963+14052+9789+20485+30771+22796+11841+11436+13333+26195+12955+28373+29675+17700+13771+10272+15781+9602+29781+22410+7489+11083+24783+12295+5835+27626+25134+11518+18661+20219+13492+10828+22039+6480+15792+19024+11949+21692+3024+488+15022+29691+29368+6949+862+29133+11408+4218+15333+7370+7930+13311+13347+23851+8116+28059+15855+32464+2491+21037+2821+1970+9598+23545+16990+17141+16788+16949+14986+8906+25016+28668+6476+22220+24613+14745+32099+29472+9884+20162+5445+21648+6337+15318+26333+14915+31087+20653+30290+23985+4203+25170+30440+2631+15779+4824+32356+17403+3190+592+26794+24941+10169+25346+3896+11349+29365+9980+27766+7415+12651+29525+13804+7497+8521+6895+14633+9848+31883+32648+11850+9+12016+2858+27459+22846+3333+17430+4994+19721+31038+21158+7015+1206+23279+512+26831+26980+8904+27252+21087+19858+2839+4840+8653+2713+21645+21890+24660+10693+17841+20123+15888+30430+32724+8479+4021+12257+27177+10996+1404+10314+31569+2700+21023+3518+6850+9631+25292+18717+8963+31758+29026+29168+13780+3652+27989+29210+27225+5622+12344+2859+14741+23465+19419+5741+16166+15987+1194+10678+21135+4309+1748+17887+5979+25385+2056+12513+3795+15509+22035+2436+18678+1107+20362+32260+20269+6519+20824+31469+18434+3700+20059+6164+15896+9573+30126+22023+20448+24765+7842+11655+28927+27406+31692+29922+14699+12176+12147+872+5543+27625+9233+20120+25320+30569+8019+6685+25076+17980+2191+26769+2796+9459+24508+14429+22173+29656+20349+29538+3464+15395+31630+5251+4887+12155+11675+7905+10099+25901+1296+30666+28226+13948+6654+22930+26248+18133+26338+32741+7454+14073+11806+14806+11289+31128+21536+4328+31137+5964+29985+20762+127+3171+18790+18562+21615+23419+21499+2777+5692+9344+24347+22847+8970+24003+11711+23977+5606+12079+8348+15836+21149+18530+6373+19504+29165+23811+23929+13640+31133+11594+24251+9017+74+30548+15046+10502+9591+16667+28612+2210+21775+14026+31935+15957+17897+19844+4020+29591+11768+32272+21080+8236+4055+24550+27770+10894+21358+19821+7108+24668+19190+14226+13415+14274+3700+20444+686+30000+3340+6596+32332+12423+25176+29528+4384+21951+1265+24217+29806+28013+1333+25538+19814+27076+12248+5920+17045+19451+10138+28827+23098+2636+1403+23917+13356+6811+20792+15638+27098+24374+18655+3585+17786+20510+30775+16769+30011+995+13701+7872+18376+9398+12779+6401+9785+21939+30613+26732+5231+4441+32120+17233+2433+22167+16982+31410+8333+27775+25411+18579+2393+7587+21112+11551+18095+2207+27740+9976+31061+13098+7904+29162+13469+16094+22046+25566+8086+4547+5547+6589+18515+14836+12722+14398+29357+12141+8963+3978+18313+30306+2717+16375+1581+108+3517+27697+751+31774+4493+21431+2927+3635+7258+22470+25610+17272+28186+2250+5117+10470+1087+13534+28879+9271+4832+16148+7599+20812+27731+8828+29528+8170+14114+9318+10888+20302+4273+16820+5908+12394+24996+20691+26383+7557+31034+16713+10289+6950+23628+808+14910+10995+11359+3530+19031+30887+8731+5079+8556+17213+19709+3122+2596+8093+22987+15037+20771+18722+13710+2748+10643+2839+2519+27757+28005+28732+4081+5634+18761+26829+32167+16848+7696+9191+734+8032+17900+1397+14210+12264+13209+1349+27339+11421+28467+24863+15845+2176+9468+10057+5734+3635+15945+17311+29879+9841+11480+10194+25969+28239+6518+4420+465+16795+3230+20415+8021+7510+1037+1490+3483+17371+25170+23265+30017+5106+1108+7394+16088+28936+24282+15166+30254+22584+17768+12139+2878+4801+11553+14086+27736+5997+25851+32725+22998+28558+15013+12756+29071+32089+21352+17420+2943+13451+10173+30412+24086+90+6382+6244+24552+23044+6566+18355+8025+3858+20516+20714+7135+12962+16240+25037+22534+3137+5517+26573+24223+4750+4246+31760+22896+23599+4763+3298+12685+5967+11637+27843+29307+20918+26563+16209+31560+5909+18133+14647+10583+30686+938+1137+10535+20562+6107+6992+13686+15532+16680+1177+17225+24294+19486+17831+20115+4048+14546+29098+26331+10405+20179+27546+17734+22490+7240+11886+5037+18178+17111+9346+20433+13382+22785+27355+19581+15947+9896+15548+30515+19172+20141+21619+19611+13340+622+28983+24933+18425+6397+31932+11125+4370+17409+4378+7685+21562+17644+29257+6842+4090+19402+20188+11411+28240+10724+7310+6091+30017+31080+10968+23903+30529+26654+2434+5140+14392+25193+21563+20756+23242+6965+15342+4071+948+3065+27805+18064+30058+27298+15580+7211+25021+10683+8337+6480+15357+24758+12099+23222+19156+3213+25063+29795+5510+27600+12248+32693+22703+18467+29619+29910+10320+11977+29531+16290+867+15182+24819+27240+21932+808+9751+10531+19333+29546+14255+11784+30047+3682+17518+7963+2415+16893+12462+26031+8758+321+25981+23417+20617+15906+5798+31679+7298+6113+11845+5818+5204+30739+10797+21914+31714+4534+23935+15870+32742+15906+12741+2926+23777+7261+31748+1953+26139+27609+30182+19973+17025+9759+14918+14912+11995+1925+13635+16459+30721+27573+18569+1876+5320+18015+6465+4992+9341+27718+26406+25822+15790+1517+26411+16681+28914+4151+32461+11742+16957+11915+9210+24125+28511+14693+12066+20085+23875+23671+28932+15567+6406+24863+8450+29859+29435+6981+25106+32273+28214+3488+1356+18392+9861+29530+8023+29683+17228+5584+2602+17037+17742+3061+6611+25051+23338+1582+6281+15891+25446+21263+24334+30234+3671+23619+4391+4879+11394+5651+17200+2622+32675+3251+7454+11269+32590+29742+174+4594+11093+22912+18499+2484+1581+1258+6090+16080+17282+31572+12715+22812+15612+14241+8317+2492+28947+7787+31152+29411+12819+3134+18587+13620+24104+4096+323+21037+5571+17689+21259+26998+12504+13843+31842+32231+18110+32234+1842+18895+20940+12938+664+13932+23411+14649+21878+11947+28451+30292+25885+17629+8231+23346+2891+19769+22461+19619+16336+26795+6960+1385+15977+26306+25257+17064+32481+17847+26727+21229+13036+266+11553+24807+29990+626+3811+28371+16698+20275+2507+1797+21574+21860+12205+28472+13483+14012+31351+32744+18528+2538+19705+19963+31761+15098+933+13539+963+26278+11869+29532+6282+8789+31027+28637+32413+24085+10762+29456+7733+14873+15665+22180+6423+8549+30782+15931+3052+9932+13807+24988+16698+23561+28338+29250+23543+20055+18133+25975+24303+9514+32142+31519+13292+23898+22200+25347+19888+29861+22558+8787+22266+9902+1354+7402+21818+24350+2165+16252+20138+5989+25791+18700+18549+1686+25666+9906+27717+5138+3152+20359+8963+11583+25750+12395+16973+19041+13340+30251+4098+21724+19725+6218+11534+19906+6127+9891+11860+30674+1326+6048+26194+30976+21425+2161+13293+3523+27738+4388+16339+9493+7675+18287+25570+8622+8894+26650+29615+21317+21614+28478+25799+15182+25521+32171+16931+26500+468+27251+13047+20751+11422+17982+30987+8991+23519+29538+14800+27350+32353+28574+1944+782+28491+3221+8101+673+32175+22864+740+20207+12049+1226+20226+27404+30336+20533+11797+27646+29322+17571+15059+25647+25602+10223+12117+29814+27091+2410+6998+5593+19693+16514+5973+10728+15783+4915+1100+31309+16407+9345+11446+21843+16608+14449+25223+2031+20428+21643+32398+8931+25702+23364+13694+27115+14941+17735+10838+25538+12902+16000+17811+6018+27683+32330+10350+14386+20607+9923+16755+29505+13062+12641+22383+15333+11063+8343+12034+16730+1420+1344+8248+14972+5887+23561+22558+5323+4264+3169+16798+22007+13208+11747+10460+30104+21375+19782+18008+18112+20813+32723+21380+24862+28644+24412+10647+1826+23635+20806+10175+1581+26801+16491+18926+14283+27685+28503+11641+16372+9708+2804+1819+29012+9238+32282+25441+22196+15571+22739+27195+21498+23270+8159+32507+29920+10688+369+32408+5786+29116+993+13932+29803+5176+29030+22210+20461+22974+13895+30145+12891+28429+8552+18868+10738+11244+2728+4087+9239+30385+16584+29898+858+569+26969+19815+12175+28658+23419+19404+18106+20769+18751+18594+643+31663+2839+6064+7388+11227+8397+3239+2088+30059+14569+18847+23224+25152+22689+9415+5569+19658+20254+13197+26018+24283+2237+5257+9651+28896+3698+29316+10808+20041+2708+31133+12115+24962+5046+2032+14737+31009+26904+12717+15740+9822+18896+2613+9427+5110+462+27446+1273+24576+7760+1602+15774+25950+28637+29813+15335+16806+694+3515+2739+20769+23072+27775+7003+24980+22342+14037+28842+17506+23639+24230+22617+18474+12443+2643+15854+22483+29110+32574+11150+27026+27502+27400+15121+21809+4397+12563+26574+24984+9373+8355+10666+29045+5018+22272+20100+5907+15769+26945+14374+17616+5873+12382+19184+19405+430+25041+22972+19214+29633+30584+23244+1721+16326+31268+24151+8905+6727+17059+23439+31498+17077+26658+2847+651+20875+28207+15811+17069+18405+870+9635+30975+8935+21283+13240+376+31161+30988+7787+28264+25627+9021+22779+19927+30645+433+3549+4336+32768+30691+29867+32079+17758+13225+32711+27187+9897+9583+11145+5378+16905+24971+22279+5933+6787+6218+10471+16872+31408+21486+18825+18653+2870+31758+26053+18938+13803+19808+29009+27547+9879+1845+8375+12728+11789+18476+23543+9077+18095+2767+12720+1890+18255+947+29032+23904+13413+14191+29867+3794+22641+20611+24377+2235+16045+19179+7094+19202+427+32600+18307+20459+16156+21158+31104+17530+16879+12382+29818+26430+6155+22672+29313+23889+19967+1928+24079+3062+13497+18157+23433+26356+32506+17666+30294+5457+27889+13989+4679+1651+18139+13437+25973+20403+29028+25439+23179+26649+23786+6266+572+4179+19212+5829+19525+13872+4826+1418+5327+1827+1597+29914+10682+1719+24038+10411+27205+25490+8123+18062+10327+27584+7353+16827+25670+15796+27192+2028+3945+7304+8303+29185+14245+8459+20988+29334+20287+18830+29729+13872+32503+595+13006+27874+20285+18778+16068+19262+22935+21749+10289+11892+19195+9661+3333+9600+29790+23086+32202+21746+24027+20432+30606+1916+27546+11614+30528+31678+1746+8582+24597+30918+7056+8282+25117+18638+17083+3358+17267+19676+25182+31610+29195+18036+21964+17962+20861+28126+26505+17255+32368+23888+5250+24997+10597+14930+18480+19044+1960+4998+18604+6137+21554+15008+29646+16592+8090+6710+21173+21287+15909+28864+14851+10624+9264+23430+14382+12561+20060+32371+15179+11653+27361+22572+9248+9573+3395+10967+2769+9738+21156+3042+13341+21940+31560+14854+28000+15461+31354+30253+25001+1475+15747+27680+4717+17461+22923+6790+14856+28989+17295+25369+4024+27816+6711+28486+14735+18719+9482+10191+30980+24902+17774+18871+4956+5699+4776+14420+5877+9618+2944+3503+26409+6583+11177+22842+20351+10309+16040+28050+1430+11207+31212+2495+30200+24751+11+19991+16240+28033+14538+27287+18935+4279+27505+25140+10029+6197+23457+5733+15953+8807+9604+25375+27607+29097+27272+2733+23872+32221+17325+6371+27621+7037+14151+11871+25030+5085+1
-
@IRJ lmao that's intense. You must have missed the updated one. It asks you how many numbers to generate with this one. If the number you're using is huge you may want to use /dev/urandom instead of $RANDOM%, which I think can only generate a number as big as like 37,000 or something?
@bnrstnr said in How can a split a number into unequal parts?:
Here's your script to specify how many numbers to generate
#!/bin/bash echo "How many numbers to generate?" read -r quant; echo "Enter Number"; read -r num; step="2"; answer=$(((RANDOM % $num)+1)); newnum=$(expr "$num" - "$answer"); total=$answer; string="$answer"; while [ $step -lt $quant ] do answer=$(((RANDOM % $newnum)+1)); newnum=$(expr "$newnum" - "$answer"); string="$string"+"$answer"; total=$(expr "$total" + "$answer"); ((step++)); done answer=$(expr "$num" - "$total"); string="$string"+"$answer"; echo $string;
There is a chance that you could generate a random number right out the gate that's too large to allow the number you specified... you could just rerun the script and try again at that point