Statistics

Problem Statement for "RollingDiceDivTwo"

Problem Statement

Byteasar is playing a tabletop role-playing game with his friends. To determine the effectiveness of their heroes' actions the players use a rather unique set of dice which may have nonequal number of faces. Each die has between 1 and 9 faces, inclusive. If a die has m faces, they contain precisely all the values between 1 and m, inclusive. More precisely, for each k between 1 and m, inclusive, there is one face that shows exactly k pips. When a die is cast, every face has equal probability to come out on top.

Every time all the dice were thrown at once, Byteasar wrote down the numbers of pips visible on each of the topmost faces (in any order). The results of the i-th throw are given in throws[i]; the length of throws[i] is equal to the number of dice and each character of throws[i] denotes the number of pips visible on one of the topmost faces. For example, if throws[3][0]='7', this means that in throw 3 (0-based index) one of the dice showed exactly 7 pips on the top. Please note that the ordering of dice may be different for different throws.

Given the String[] throws containing Byteasar's notes, return the minimum possible total number of faces of all dice.

Definition

Class:
RollingDiceDivTwo
Method:
minimumFaces
Parameters:
String[]
Returns:
int
Method signature:
int minimumFaces(String[] rolls)
(be sure your method is public)

Notes

  • Please note that a die can have as few as one or two faces.

Constraints

  • rolls will contain between 1 and 50 elements, inclusive.
  • rolls[0] will contain between 1 and 50 characters, inclusive.
  • All elements of rolls will contain the same number of characters.
  • Each character in each element of rolls will be one of '1'-'9'.

Examples

  1. {"137", "364", "115", "724"}

    Returns: 14

    In the first throw the numbers of pips on the topmost faces of the dice were 1, 3 and 7; in the second throw they were 3, 6 and 4, in the third they were 1, 1 and 5 and in the fourth roll they were 7, 2 and 4. The players may have used dice with 3, 4 and 7 faces, giving a total of 14 faces. No other possible set of dice has less faces in total.

  2. {"1112", "1111", "1211", "1111"}

    Returns: 5

    The players could have used three dice with one face each and one die with two faces.

  3. {"24412", "56316", "66666", "45625"}

    Returns: 30

    The players could have used five dice with six faces each.

  4. {"931", "821", "156", "512", "129", "358", "555"}

    Returns: 19

  5. {"3", "7", "4", "2", "4"}

    Returns: 7

  6. {"281868247265686571829977999522", "611464285871136563343229916655", "716739845311113736768779647392", "779122814312329463718383927626", "571573431548647653632439431183", "547362375338962625957869719518", "539263489892486347713288936885", "417131347396232733384379841536"}

    Returns: 176

  7. {"99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999", "99999999999999999999999999999999999999999999999999"}

    Returns: 450

  8. {"47863341856811635287874297162687395526947469566", "16652628153822725823885173337731272829423135282", "78673621558155124948685593693369433186476473442", "54489418167355614755289721963925763149746898527", "84412877152934851142388456389936292161482189896", "21484175338577543612221763154481872524179358557", "33623727662234561952587527122667359725481676797", "76389958382813719145791815626898552543293246461", "79296812417649494871864226437239953219739152966", "75618317171791438714749752896984348488475281135", "41973817938173664212137487283994866867661241332", "89946593848165958757254718271174215845159758548", "23259864158573784416797246914123383886781852892", "84766753755136924452252627145115616994132499178", "94645888675243985396593349795171653595665398867", "25132213147542738422875995467195422857916719431", "95628767769359834237993111776564131852781612676", "81439653885882888467659463435875581353525464985", "23489367117458939353298639165645529898215496684", "35731691369691528852581779187897954529148716668", "75163644781532387955513857266798968213183826416", "13189473412232364797171934949682641613395231638", "16513411137256678463441171236739397484763111434", "74268633837413822392435327263765634882175795241", "94441466831715532222444781652698198446729937867", "79249978434938192566135358761575733666546799588", "33336938238654997486449741848917117138163172317"}

    Returns: 278

  9. {"5482248528947397115167798758843497913326548643", "7711371355671878993663255786564529997214836385", "5832251241543418423157378378833154974414335625", "4318453287868426486851683177925995282229484441", "1314612993213897554961267111345749667147494518", "1693589973337964694527846728421515386773233288", "8157643324573715188445126657599866246687191489", "9564913886527759799528771179859832292935656537", "1629321199447714934452787192736862571136464653", "2122922263113594796411291476133134763165444513", "7721251595613343381431288959239716885842627419", "7147456318321685576473577419668239738381544867", "2938873797513972988669377461522729867814493668", "4959412258563728531646423295418731238653277882", "2354761425468777673625629138623454712721915679", "3334883196364833149242539322797572781739816823", "8175828259934813296276447254166711449397786921", "7181248825475974949549367281979743914467542558", "9575434722463178443428635532774414471426921644", "9784211618789729122194522846691893911358945147", "9391185855831968159854399524457398784259918411", "8685563122997962349343649927245856117891132435", "6381781699267893241737783855995971888787335866", "2412223259131641195132782322618432578448153672", "8799439782871275698687978944356648647755774778", "4165726571185152185833961321182879882956632957", "8823182975992429924756413199578699271442766834", "5651263756739476756648117171613282786843924446", "5876418313997199173571352193826141161587335799", "8161942629977174793446663311453842832683721257", "4952682883648514246553583898447181259529585987", "5632657413968687833422619544666241825166112528", "4297868212482361495755135471337678675641835728", "5595372976988558937718859988179597817182779521", "6726277221795214134459813672317594343285845848", "6133797376619242387284165639255225275182844333", "1422558678674691515954735799734995333264571378", "3536761221288821325659879775788151811992587347", "4333237421634353378342239675637559838854868223", "9987889816821791362267843483831386443995741994", "6142568689717149153778825754465715257375455314", "3675132135365549826938775345239144759382213963"}

    Returns: 296

  10. {"74959689863624839682916871286699266918163992171", "13328325554521888216448734761268545381221217421", "11789562652747668555583344747829521941132146772", "37394214959144883866278785316575622638141112381", "35542231849611843931184887889147727348865114559", "98666452312754263168189595312833622462537655582", "97758246782825988493722623972191769426753775879", "16276548276282146636232177578574471914748155358", "69723716165434311679786652429814154961733734626", "13757395287247522353876532372669916723648592169", "27761767825391933931912697264168972447739551487", "44591969698277769762289315456753263427846975815", "74955683882887235725738678274223272352461174117", "26654331861558448268691568195494769858777692486", "83673458712795246716194584826647413533875278397", "18473947551193697563547843978886343199359818782", "19887436594291363174961834953861523643992112593", "11666131871744554913775966778145513944373639362", "92787481815947895913493353179659376618114176119", "56325935843758241739494433667547266792814748272"}

    Returns: 283

  11. {"5"}

    Returns: 5

  12. {"3424857143631883725426895621359859563735291472", "6475417248915375121844521218489865723365288199", "4493476929264558414164732597752943126332648572", "8961247736671221237445158465429134273669332114", "4139212254739887344671173631618953912234971647", "9323228292685749723297998113232233857926895335", "7342291896769227785597159787159525515713543227", "8323785778288654934731838498949854848153655156", "9283752973515938565854627669219132249314545536", "4848611756524248517452765283617122575162868867", "2226558338385282895774921495978923531977976175", "8238939128569773434222888928286596652885683176", "4851525216838183462825293866474985491929181768", "1372656851589845111394131378714912661262597216", "7392336846184676398176312672274919344937598672", "1386617123358451421184274725518646784785356941", "4995825744911968653825639638559322161957236533", "7762674275549442557426171896228743849831721629", "7515751342654943397296751871961417491392798425", "3583322293234817658841178538997981173229768168", "6242531447835988432563532628361622529518114875", "5632837741988617143833632467836455359696626933", "8516516526899877365547869471548885685567436682", "5255988761733737545522563628988678192772397592", "5139666629739854167626686622977699717793633299", "9582971138114524765238168398331899627965916198", "7863181774423181559954857268345189821311151987", "8578597816532311342433293642567631323859892374", "6494179365872366561794486274974157249637519697", "9557551295153586595619995591931498514182731752", "1773628141945846535896915164497189174147417659", "6323755253717621541945782191657311667311986746", "8747859182745118587583937186699257138789745772", "9264728751562753518678417988164113713941791958", "9248623949666535158897112889236892342548195374", "8392253849327582322744381541941691225161337431", "1967727584196817891439417862764628655428291388", "9494886426128975732942663526552551392125585937"}

    Returns: 284

  13. {"1", "4", "9", "1", "4", "1", "1", "2", "2", "9", "8", "5", "7", "8", "1", "9", "5", "7", "5", "3", "2", "8", "8", "6", "9", "6", "5", "6", "2"}

    Returns: 9

  14. {"234641986", "721643568", "261192118", "647431722", "247571443"}

    Returns: 44

  15. {"37"}

    Returns: 10

  16. {"92535829987997776135584816531286462996762554439", "17891521567539113166725989832257191162572964239", "22159311962822672866751184952189412224893161735", "73793796822556829669698893676351884296886523672", "57797675763754361332458665756442231164962857843", "53584456176132751946998783358453173595221713597", "19673642134458211453528549413291626288952342122", "87836165968224863127729169886856242356197296981", "29494281527724278188478455855976394698376919655", "24438754352299667853375379772813464256618932646", "88569446929359674829957979123962344154239658626", "53267255377455451567416758132377555255364273261", "15835452163147183352492265635876766411727171226", "31737384479943566121616576453227241993364757817", "73123565617148564215647224353924851429231923742", "87273337863132948592372932552833944795197688265", "33333485875513193815327314362518335945937191771", "15389683458715462784719432132649882245239241571", "33163736376822399298487121229898527774527225416", "56896162625884399279875248589961545536951137153", "71464537724843577125611469353737899629237483968", "47999373434281936478579677186549627127318932453", "26613318927526675563313142657414462363336679918", "78858145156325357761897895638415377834814196648", "75951961658563938874975871829985998261196895561", "43287783638156968485822578713133474661394216496", "37914412298243397965125391989267944256638447521", "76262343556614194945996215317392945431888337251", "32699155664161221542977115411513555925597991198", "32688592524681589344649217232675454342356616572", "84881964328311979913135187763869242935933314393", "56381395753456476387228286732536364883683127895", "24828333447263347191581831293828785786682514293", "86434438263344329881322769939839343132599951551", "76678992995589775467647991112518858226599319697", "43539739383189684276736159319379624963121247873"}

    Returns: 288

  17. {"8", "7", "5", "2", "1", "5", "1", "5", "6", "1", "8", "1", "1", "1", "8", "7", "1", "1", "3", "8", "6", "9", "7", "1"}

    Returns: 9

  18. {"86693182441239614983673596238522944779713958233", "33527819537493896221168822726374411653745465484", "85872376694454116474591918238161517843593687521", "84389651236223453789188387927964892261468717551", "54246894372891281356974293561339821624717233518", "92291696866979617225697244215121925411648582622", "97336295421326368126343256618543143234972544196", "14363429489618841339417663895539335156778389245", "37471614849494238697917363217933965363424213551", "46941433269535559932973411176761952596131349876", "22856212637538544994788586371859576898338652946", "79927895678163922433885234447628915547132496891", "99458289733466892276676985972278218947582465411", "43716433823128156512664545573549246783454499937", "36363646428376124745278663148283373657934532759", "72152245912574693794191645184596638444825352419", "53816547565445162677159313869877948455534592625", "11873563777673914658845332774824575782154682418", "49437388959663684579321659739376617239712679753", "63553864634426165436972929738377779394183997892", "76683517766869851685698734752157347449531741616", "93475815254298238243959827828218722473557483716", "47548517566173628573785568112819395595785136724", "42828932398831227576834772592622535931348534247", "63154698838874979675545443228154691674795498813", "42757853261382493817843188915751757916853516184", "44596817388475381865978189855379949316419349235", "48461859692114978468821149569149749244285965337", "19364274451873821273919454284976198897464351353", "49378164925166647693685212883471343931175284627"}

    Returns: 271

  19. {"968"}

    Returns: 23

  20. {"89679243", "25111626", "65147247", "12332196", "73927423", "65334911", "82979595", "43593728", "59414414", "32284742", "42378387", "22438813", "87983653", "99354728", "88143871", "58163219", "29643439", "57287996", "23127419", "63324446", "71548396"}

    Returns: 56

  21. {"17772928423812971321546579967542917331568435251", "16698432895835164921778236337384857471526658389", "97896351559499997157837196476944821389278422475", "25221315727393711354174746895562179331834598868", "96927259258519221726642493498849844445885768582", "66598657371819985362816159971241381663455684429", "16972113219386119554678974387863369397512454664", "49273321661822516735315629729656168931957889758", "51476769125698414682282149287642386856248824259", "62457221419517176197136492858329822186527245174", "53189382367276769599421696984546345765712186172", "58843966566533254545415663759591151562998773451", "13564236782568528311483234481914145838744593194", "11328569276911711478113518746657685521478278765", "14751222372939423317659354924162964149156547968", "66879249192594784257417713288235638568369876114", "77341418176869267492234965756255131962676666765", "65327563573436124758755581421312953527184868586", "28429395233619634534899294533418843849174762269", "21581683854826264591694445466365899571388353423", "57127297789269714271855318296861799866398457297", "16396997678864361823556418435111192196946436416", "22521932538663881993952638644661393739693385335", "72425165514562553349986532457575756232782684274", "78218144578653554495272754155182326868761279244", "65471733543569151621379647835466186466976566337", "83921874985175761711935728771829179113663517558", "91439891948497224651549469885418246433424751132", "29239848939662779957612924235258131566879646218"}

    Returns: 277

  22. {"8625948846743893181153117194298524215741593134"}

    Returns: 211

  23. {"1", "8", "3", "8", "9", "6", "7", "2", "2", "1", "3", "5", "2", "1", "2", "2", "4", "8", "4", "3", "1", "8", "8", "7", "9", "8", "3"}

    Returns: 9

  24. {"91951235312663344569257876864629753798175194732", "55235352664321241933923711699929981635759823829", "84178591919768786629821175288876919521857163116", "18382959433825422486294347797186784765476164594", "47742973733456612744594264856593264695165931343", "57899939998713859635748661389378355116325636714", "66839138689695437763347693319124273435114322847", "69732315888841412388253344353257355881665795781", "38658935988628988967693262868485873293177247186", "12869249252894219828932883953749732854338589716", "46252537191196944315948176993287853175516711519", "78486289684567789819193336963218295193444171518", "78642417294677985357956251546615653813895949573", "36364151191379854815822164585465133248388662534", "67927164588287921566318628972437385157766546737", "19416776195384449892747193488697655969863978963", "39193974341834971221748873978774857689343417773", "59462866227297165899796712197435381374291321814", "62515853242134683387158251632727218995152312273", "24975529228995574219845217535942945331347375469", "59419288263368657185234771787115819756725686846", "91364872362697541745336969675744449945328756133", "65615573682815473596439448442751475949246426534", "62473993661966461931859133119494966544383394393", "24313767541811275496737535182447388182962797753", "51426424365448552598549742241954586189971591613", "71722711457776444729189623877254298462944159466", "69962814752471512493487997273895762566252369723", "98349277949616213361223935917986822712281516965", "79924424198787512183312788876538731474569475774", "21281689719827497788549813956436253846259455522", "55377823635969925569438434129543656591671996213", "19877515658545322138435352195631526912275375387", "51361249969128388253133511199545329763822532968", "38886324286541645267694985187732568173627994643", "61723257375844695498822118976335388382323971175", "11799616668483437911242876151292464395353155265", "51929129951555851773111656569648881679831535523"}

    Returns: 286

  25. {"3569483982529966452647413342328211634366567841471", "7965643838848743458838819833376722411562651166154", "4186544689886515342567883713163246249451752653254", "8227485196625746573324151627533631749699319926136", "4332443242794135137496499331333499376969882462785", "1391836759491934612964462748679388697739191289222", "3799924795623371199446276648932576773661898462473", "6252132759712888263275842919757945413274781589987", "8964819866136676565775299472349826385679271773641", "8165788164855321717729771331182255215533156894565", "5649652418683646148685555533982221265323539439949", "1424173419175947517639321321593854197451593422532", "7199486548857747377638855317399888414972843541217", "4733278424548719892115518451364542696989759712265", "6612281373756265225356555624277735524246344157933", "6643861578611797953157896533363556645738572414955", "4755736324495973739774258649492952156442717386443", "3492975535663669121647845999442667225497151128384", "7964285336172783562695282337632383132649567582981", "3119736714474373196149239221714552371357684722453", "7624444674944124449666426823261473892777621143399", "7314476251914146674295199468267271742599826852658", "2952253968397782949164618621533361395314298231392", "8932685989888881721114889229764324272479879719611"}

    Returns: 292

  26. {"5596476152137689885992713671893922563391651735", "4646491579495386888144156258429945895192357562", "9343274123591993851787283973948277389281687613", "1799287739726884563913165423827718367324962667", "9913881199789122479939767547524135356639789297", "1277937539341667333579142659718295716528567843", "3748657155769599314837155611366777623671696136", "8422628123729964749467296473951964842736458942", "4623829984476523626982932781743456996498393597", "8884481613362435933343514119524463592558878196", "1521298578395565959317345662832315884843623647", "9478578799927959876412499819821863661383288431", "1165233794395243512679654866775938713321515345", "9953719166272928817393491145583899329323211611", "6838265873157519613978222825523868874722729151", "5826891836788843152939823957314593565596548139", "1211317446675592348748579149553165612772437615", "9234931313385415193736911375298746495822984644", "4533888213617624824578715463395399163972655979", "5513367568117931635149987184697576478246463657", "7357149357217632741149549911492996999856539791", "6957694249878734757719468192311627915482969399", "7696541421858749411535938433831658873674567862", "5342645381661264477178178282418765759652589265", "2759843245525834844117696647537729428968399125", "6228122238877874567264497988835418897472476162", "7668344216627589635478471279764427183637386327", "3144361723937772285949845463324961466246687426", "5999292183974357952681917284285658359935363427", "5878949343951881552763657191315544752487522451", "4463388556568943127143851126792148263372358437", "9432898711393345467527158847252713958274223899", "2957526681388526472425182398199693975175287998", "4777995191354868552613423585925113951829513329", "6987798433697239127623395785623824589146376912", "3988155364876137712577551998228535897558269147", "9789512553872257396318851217863883387169712459", "8922679162652269696588413132623259612469483762", "1256541388166187492377249793527644494236355822", "2375334941789854599185547296328279473535745566", "3416654811494726895494194161953952749145651854"}

    Returns: 278

  27. {"3255619685386389575523439278151449444547684377", "2832975383149841579972467845439242786363774658", "2494333297336589543316121334731177727995925543", "6684647991184643331883684768558285131263572187", "6828977974133873539988777673561394919396712712", "3232954967176186225622647472396845381337396589", "4234924584269734463774446229361761642157294126", "2779331191264419634544787982688783717676627969", "8616622238765244473231481972882517831673126914", "3467837212687826319991244383778283942851354786", "7196941621795359598661692315969897953911293444", "8982914942447398473445365914661634436292194592"}

    Returns: 269

  28. {"2", "8", "9", "9", "9", "9", "1", "6", "2", "6", "7", "7", "2", "8", "5", "6", "4", "7", "2", "2", "3", "4", "1", "1", "9", "7", "3", "8", "8", "5", "8", "7", "3", "3", "9", "2", "4", "2", "6", "4", "3", "5", "7", "7", "3", "4", "8"}

    Returns: 9

  29. {"24647348", "84739152", "17755216", "75269371", "34553439", "53325752", "29113325", "53559724", "74739258", "45532541", "81354446", "19436664", "33311636", "98743773", "32972979", "12829786", "61366769", "37257221", "91348662", "27734453", "74546997", "92249165", "78137553", "63381421", "74824718", "71732372", "83666184", "17163555"}

    Returns: 55

  30. {"34542132484316861335856713457544621282378157142616", "77329763487199815147556217751812949352579567252762"}

    Returns: 253

  31. {"154", "521", "858", "467", "993", "586", "495", "943", "677", "273", "167", "223", "713", "813", "948", "155", "365", "334", "837", "957", "692", "564", "917", "793", "181", "144", "328", "946", "184", "778", "849", "926", "289"}

    Returns: 25

  32. {"3163", "8451", "5549", "1388", "3597", "9912", "6416", "7887", "7661", "5377", "2213", "4918", "2523", "3134", "1547", "3446", "4951", "6545", "2996", "7949", "7562", "3428", "4487", "2816", "9444", "8158"}

    Returns: 32

  33. {"999246792813867847596865559734211535681365368398", "449379432574997876344678324666399669479656953585", "411939825929656761777932226534561144972179816835", "521175216734766524719682533523369687262757523746", "752726272828312874289498138484971842443414183579", "459313856616664861728181514996223398697649663173", "745948546464856411636389517578341844527756716224", "951948237963666379397522125424986566173732616713", "724688325618355999797438511582793728981935418948", "345261163234944116686186383118976574612685719624", "231427639479485753526986221157762595177162497921", "211692452884756149764292929813918448828738962818", "745483831279997237346413946331393243185971525815"}

    Returns: 289

  34. {"826754", "218438", "165642", "924925", "883457", "914244", "671615", "745116", "784345", "739822", "831122", "714915", "638892", "135879", "674645", "513684", "995875", "752671", "152552", "367857", "367523", "718932", "883233", "525979", "887629", "254826", "827125", "729856", "899955", "885898", "428529", "673749", "534925", "827867", "154989", "895821", "889682"}

    Returns: 48

  35. {"46422588977193263286238315163376817561421531646585", "17926419223689286553693797753911646441983923646619", "93212497561193789363496727467243996546867991658114", "16797526131237231689892629894553529664177244754735", "55468143676436645141536758527878159282985739482444", "13134381775546346677717381653782246547552268438948", "38911166745586478618338622523619956398749926331831", "14556957887173792711271645352356525887426465641156", "76882523442694257865334475497956134359887176135165", "32926295724362557329361676832955312644534749587535", "27365561651478482555169529369692176195263436511445", "32259484762549897996772214971812621912883271753921", "75975899571163957763226824723243643865532463542267", "75325653358337114248892897624982635598263735594173", "87264277428169376398663369824655981365512677227343", "57544616348743514791567954256166792265355886549146", "46154194815636379427364842898889182729569689395116", "58878573416291454958758716541981298978762363666187", "84897488433429483244299789783339828526919897561489", "64578424574948266618664839263659598246258558351887", "22547885888924377741239216913561699392827612229219", "65171854831446992821933954563845373796741199869362", "66487486344598349963967129692569319359566991632132", "11937677849886687925895181191665488418186729164822", "99549897879747267145831722815296878344867962997164", "88365866787328434363525744763429487299734522653696", "22429569834757259188355188453723692653284977785275", "66239328875681251473479458548621777247869971771498", "84363297529129941371132778196798596113529299625185", "52216711139417215123376774493664244222384854857738", "34854675571784358572439657698829419517589627554589", "84286812997941297249163362398198894716384247665445", "18385563261619555586291543698163953262419297837724", "68681381261345161936682222946843463686856763973923", "66915887499626938841913942728249832231241157475447", "27954976199749972385715929328444154745117327117643", "15462694843664541655262831292599432118557364814111", "63428311334464289393965894282946748372848452746143", "54691633853737923929929771833439677512855941496798", "27123233846748775138114413298445884463235624345958", "46875955694537243438614285676569721256639756626391", "79141123282621248926699498519855448557577666245439", "28487827763658936586917786115797486716555331371669", "78885565867646137793262566933214567118678978755196", "56597712216242612371159829396587979529425318127924", "88438346341626519622971399911655312636876286821964", "74468818473423427795524367959419642697952417172558", "26826169996572428238454272156813996128276169475725", "83995224259775328279247669244784425357787653996738"}

    Returns: 308

  36. {"2729835752529755456185989745489341352464762936922", "9669563331197116927646196678696644377272971733781", "8651533857185649376529918594293153578741758675585", "5766843364963765471797878689261632125883699593245", "6234553583819348755596624998529234662891914391311", "1279267235857373892945549674513597525499228586964", "5791772675285298974173473624625254627263256142519", "1596734356335775935153425994714454652661532894235", "7892631319276272593395182635139483661155649269972", "6626865895773999493882268786244238645238951997582", "6539457975393159344271568115362888796384693872219", "3827918148659592452947647269998275218316973691269", "8231883581995426227649477738689671262956142256528", "8281933512196463369447343423946666768229324132267", "6272836236814916139167433218653666129332823841921", "8533231532531742324448867791945198756869879836427", "3563923765411458261242338819955325428686492994399", "5631454516965446298388159156875196115664474271691", "1537979316715589771536721348541817645315448935622", "1541846482193913338786442636728689443188426848621", "7754635488932916925367357579565912392881594153239", "3799692187714948556372445387568288291837461549756", "9577898185759166299582872799731544352614476486181", "4487287393256363452442953785463418631595485514395", "8523426984183427545346847971843254733627814961478", "5519617837624446724236121899645679473356614358828", "6281193756929821592368798324337458493366931137859", "7756926659354466542731673412226867415456878834223"}

    Returns: 287

  37. {"12577318356834396697955473595511459218562712437", "64863874975216557683445386775223462127481556245", "41799353686316881541758811726459578451199737531", "26275175686583396936814738245597322451974385371", "91319386531477698437312682399186338123822298742", "23485899883719389374527784548939717845789549818", "68918577525226473139918429424536698735517522778", "56445156922598818935228341876546173585658976885", "55582977893942128412521994795154282372759753859", "25591122679915699769417624232879823391487615126", "84366942131989784142835244183394275417417224348", "75554334685784785748813283265146797839598275994", "26358398233263311348339128124119816492455328332", "34649757444646899698941181991397995175861691397", "88924169285578896421494855635532577554116842384", "74887842125163569391457789755738178416775191345", "77592637145966436896157311573337658949518677826", "41931974197647843972657672987153892879246785234", "45732775322794658933717471312181285493716249428", "93322432184582961789386646984856639154285873857", "56726839167851316339692214396857932873199127984"}

    Returns: 287

  38. {"69672", "48968", "43227", "96552", "62334", "71583", "76589", "43921", "35728", "84378", "35255", "41258", "82717", "89153", "33822", "59744", "85632", "62752", "64457", "24951", "53744", "84427", "83631", "34525", "76697", "69932", "32981", "56716", "34977", "75463", "88171", "73212", "48697", "17721", "25256", "41668", "95628", "65165", "92287", "95536", "65948", "43723", "24558", "42256", "19818"}

    Returns: 38

  39. {"71545959887454318384427673693661655477975494985", "23757823811964434267475442557932222535636725717", "98645928396869926523996453269877898552924615943", "54439639631243945898144765739524322858915774112", "77535762452313497884257447183529131853177443461", "33688739796154939975694725413564651899947981386", "69232452295458869283719368561446759555858497657", "25859951737495243541381133457583471123243388915", "43285812192517422925694668496525989654222948513", "91481564593488268198635633259986518365445389179", "52962142821484352891545782351157237519534936539", "59555664579494188578296776146153372243471739445", "74743813452838812511882359846371277672339758841", "44425959999858594432788859845431434167998816915", "91294794769593166755891661491786886981243922994", "79563975916415678597713434747411716972895256113", "35599399238549644386122143951655621716351678683", "53896432999765769423666982372819889337859512989", "24334947698791627621631119132388227576911287426", "79729126827131881395463265834927287646944523566", "42747389451183279823717498786711716173478398122", "74341373273997838213569555352742762185477278911", "77693574643364713898727223295184956185143931399", "64833898563926831374689859912836296272187881213", "45391299923544422439877162745739335412815579517", "96525178946632747875931179711933264619763673923", "43538173652733347386211458466654963384634925666", "79818354154422698119678225335897894146165283335", "81448693941734728471896243111693549679426578326", "13172859638178197143395935428391116767632446568", "95421111343325684899139945299466785158869427474", "21572916544973439534255992763864862123296478724", "56729219791884722531424144576335192666515189314", "28775812571442671376449296765458771766897645749", "64726871871152284387884161659266945554516335364", "52562431267823367574958442766216878487319679492", "93411553222668318549867537947589964463299174934", "24357596493224564843773576874868468988358748499", "38674896744757431122345126122579481786299469737", "74827412168927986955788471288463985114678428314", "75683654756858559134267384267712713846935158824", "28934124285128269438411966164223688538112665989", "26152646579919664532841217525272736915569475534", "78637485644423225423499886419354738127111372891", "13972913494515133513978982387367775533856657545", "98197848559869725721966659614183597411464943641", "29869149217368695173742573671322955921894451946", "51517684515997527955712649355912231932926597325"}

    Returns: 288

  40. {"68329", "98798", "29427", "37727", "86327", "54312", "18746", "96914", "19178", "89817", "65434", "34255", "72659", "41473", "83455"}

    Returns: 41

  41. {"77463369736996485917845739654493257133415768578639", "62563274743387582683895423347976818819163167919168", "18794372182165753888136222123453754618236951997992", "95164432843731689185253374852986184843223624625178", "52761569259326117481766833574128992491697118624471"}

    Returns: 278

  42. {"794", "832", "136", "723", "397"}

    Returns: 20

  43. {"861265651399468142645938775972166119138188758852", "114814915186425233591851222574847792894964925567", "559462824441517492277247682839394744199984817769", "434488867969429698142725762928245456221531495759", "869129355777342215236154437212345574458592652958", "781457377972764683161565458179756418877898168791", "551442724646685345283947452796386176397478988639", "955148876367648484555883382315991422731318573784", "616318963354183874582528862232717858496855364233", "258997487878391698936922582799571464223687373528", "631857797923228632266792285963751752414448253931", "752688789899395844535986325184782821787337681248", "369445351545412487577732964194726745244976651698", "642936177727337838735999925891743899793381818833", "834223653733555913538317139692612148411491438378", "784132894392835265814583936341527931832669695692", "677479755442654377134538821777644172761935113184", "998561336973917181232981842959131987493192379969", "353169667737182721659994374984438165471149942537", "263816234229937532179169515788382668628482843321", "796484873824219919131237657376815523989982597632", "791968255724726363265749677397791556215263281917", "488797174336214728471429465322676637735516241651", "153253531616578616457427716314384966182663534929", "546872737119693952719556576264656465886387835427", "385172515946173337588465534836781521426631262344", "966913553896881233968548162547516881183869162536", "775478987597911727598936565873829294263827313966", "553898235521131931738628996171673765729391498855", "958826761146352867813115699281263243918885545847", "296369271434832766921449427575176212686149289925", "833322889245137542311564172174443553452261766234", "984534428441515194328845382943136961168839529892", "266839825998696799122531332216247643351182382418", "344841161689543586736671611112571456825468132414", "482775561669467794897227675421777914436833669724", "767973127422929648636314655486343363333779175442", "258583786625775537657473799183386999664958741954"}

    Returns: 297

  44. {"9685684734417259572553344895786418913187768294489", "7153744262962697455679947545912243341766412925659", "1313694365693971913655218336988748771395651624146", "5932375365435782475824567642391525953385487531343", "7576749791769725894341689214385165928941478452251", "2649335965933745885182856373961686685469927967375", "2836667235874225871311138149233672167184497441691", "9148435748958557386325148821692432166247234319532", "1544633515853953244427636196182338982257695426375", "6277587611753628748499789392431121625431227161554", "6374216437758863329671314527613294442827898925113", "2478528941933359535743487619459191185896954654593", "8663649112821465517441582848448229688977977957227", "2327655499544418724876342961128786532918553464752", "9326378381178971113673925595287316985299836712585", "2423166447583319393324557525414294231951566397133", "1711637495715592935746831666265774275459527974582", "3562449327623235888292875886794149413671975135297", "2913362442329468795736614812659561374876744636744", "1452412933566647534665488581924588599552793476333", "3822222532138524296774988853881864291575837674976", "4198378216261284454543963262831895686184347976749", "9929399233857557565738722293488548686763331559564", "6742286222516144147734581197269666262773551619364", "9839693334246429114672429368868881221923213532597", "3692581971825581412713115122284143356732357888434", "6555321177933151729969295569772572873681648131531", "7593813481346435784972322757877938756567113786593", "7287328166983637267728919556362379474567981713115", "5532931789649814318741753911936641645593913392134", "7265616994353753665736316919433886666114536697142", "4432281132588635144267456862469563951244868881617", "9676773884685133192365462317785463255145433875222", "6825724835623722252598718818275967582382919887918", "3136143976861854584297371354218614436387834514935", "1976394557681447559896256521419726634648411559399", "3714192884143194275147494176189846212142245393356", "6171155922927563687436913851711435139526291369179", "7374913965634598383159697311681238815835792236331", "3454629379464279262475953783759926249678588873116", "3995695487751155239498785346598921141518331867788", "7273471219223215516518341396899979873779223694995", "3512965939189797392587258668595891799996991297234", "5991952365339964111471199335976246732769465643943", "9734295886259769881463117218697684412691859316158", "6179925389257879654792479827626489941117774964415"}

    Returns: 303

  45. {"4927497", "2212384", "9629844", "6594137", "7297888", "6587432", "8822696", "4289774", "4552621", "7314312", "8468184", "2238785", "8373781", "6795557", "1316837", "5493247", "5619736", "9148633", "7863143", "5541715", "9611298", "5589418", "4472258", "3315967", "4843176", "3513298", "3653694", "3785977", "5175947", "7645584", "8524421", "9941939", "7526556", "4744544", "1763583", "4136492"}

    Returns: 55

  46. {"942969198", "853538392", "321955488", "599131361", "278551144", "958633158", "142761944", "133737569", "546225879", "297461686", "763786378", "661418266", "911622852", "295596736", "173694477", "229267836", "276228569", "475744229", "294796258", "522899578", "622283421"}

    Returns: 62

  47. {"89164861344921628146892769351231618586466175476", "96553991692227441444687362241994873232292398846", "87878498683489453135132812556292599712472685748", "22999219961346867878261313575593973993741911653"}

    Returns: 255

  48. {"1", "1"}

    Returns: 1

  49. {"24412", "56316", "66666", "45625" }

    Returns: 30

  50. {"281868247265686571829977999522", "611464285871136563343229916655", "716739845311113736768779647392", "779122814312329463718383927626", "571573431548647653632439431183", "547362375338962625957869719518", "539263489892486347713288936885", "417131347396232733384379841536" }

    Returns: 176

  51. {"4", "4", "4" }

    Returns: 4

  52. {"9998745621445", "9998745621545" }

    Returns: 74

  53. {"123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789", "123456789123456789123456789123456789123456789" }

    Returns: 225

  54. {"4" }

    Returns: 4

  55. {"3", "7", "4", "2", "4" }

    Returns: 7


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: