All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
All Combos (Posted on 2024-05-08) Difficulty: 3 of 5
N is a positive integer such that N! expressed in decimal contains:
(A) all of the digits 0 to 9
(B) all of the 2-digit combinations 00, 01, ..., 99
(C) all of the 3-digit combinations 000, 001, ..., 999

Find the smallest value of N in conformity with the given conditions.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution | Comment 1 of 2
(A) 23!
(B) 220!
(C) 2091!

---------  comment out 2 of 3 lines for A vs B vs C ---------
facs = ['1']
for n in range(2,3000):
    facs.append(str(int(facs[-1]) * n))

ones = [str(i) for i in range(10)]
twos = [str(i).zfill(2) for i in range(100)]
threes = [str(i).zfill(3) for i in range(1000)]

for fac in facs:
    hasall = True
    for string in ones:
    # for string in twos:
    # for string in threes:
        if string not in fac:
            hasall = False
    if hasall:
        print(facs.index(fac) + 1, int(fac))
        break

-----------------
(A) 23! = 25852016738884976640000

(B) 220! = 22838603359146414573972658651153337270429730715462287017736347161260276926030248
45877776549791921102945706558196074779575009550523224197049956176972302056587667
22616606097632340497755473254301355713314682574755379945084952337706589453102105
52725163342784668756149049213658078338458534285571551800849578848226429898670032
94551385992993862178352349027264696691854493614080000000000000000000000000000000
0000000000000000000000

(C) 2091! = 64536472071648725652592612640419881740437650446955386516104454605665557809010889
62128978580212121661936114317148808590261490439446058993966580128655604442156838
59024112955362222273424445544950453355939184377150767020860219792816074007403794
46594587355573979614348254677477271461729420421497952998957244453425025185216460
90510766147337079088153321045830014690658657083104378674947802930809464129635250
41388412825457167629058883939837512068016244557674972675826609631879944318460982
64391584912249511846409507749644385844898122396089040219415237927938360229997411
04170598206730478327988801419447719707580587032770260472241382167869068974528198
17277558235284825982813892186386506719519080804093923119556659986509618807965048
37386106658237806834766454544761554640225181238396752519146658018987254154978329
49284870017884373853887969173895054195210387877038793117263017199588127421656427
54707208892125697143112419629755185800845271531097041005749818304261942536362066
00782863553855822173386231182984437194050059919362798742065340717500791352729885
94135008104276807071275730570792887824281379812134455043919839051807261971905412
09736291670107101441643519461838476608126443899867647560916303001587358756639073
83659305958807523762387891148352654278417679123053264839100179172760336054341706
63488679353060378152864922485784293478922501905442424653896811313188378688551677
99630138614020990114281070973253640934026930037025677676137294031141564843375932
23391873633942663616570895930329631123684798739894513552201185401889392745256289
84075910131124906927990098457384952222030680494915158905494306713000249128146058
54272128167367351318571384604258753316619971430231986641410925171110667479521606
94874712144477213636592771878995459641349959128905370667740919592395805195686627
15622339516995197120604577404941969091858807174191131959385459634122935682448462
08297539347079749458177480033542695051168049406952314617285677756045464392432146
26382271533290753193582677516647924895258839995200528311496300996784090111514435
20847748805048593126264105584462575322120821496728980444395992384529533467894429
16182291613984237237596162519521641938631015332836798098956754802946938151462822
20095743290049666682127836155738614135849933866647699567583811582206403861130725
52606021754209301385816051674733831765211059516322562977131972697158007062246481
95630691430521476369548806767986754508330491436707083525984002570236522277568137
47502245549545282913309218454997207512473763990366268979434723921919193101150685
26355149143935574534603349270921192838150035002419061711913345335619678153978609
22765621002482495812290869592162573320100822884515707122437016840803479003946315
16311068885342796717544197301939240029719290283329367752370424719363204938864732
49909837236379319761893462103607791236266728725741300014011460335716603405621805
03499388164281632881837320772485682830072778729037527152654431870799487667200132
51208715422422951096831179473698065607246722137465437858175998285424756310442610
69376717224102276193030964479807686076887111642575888623791964562261785503223992
88876568784751894616091858802371910891327447444605579586616317155487329166329947
56092365394245643965246114897472266829283156046329349000956572009303349664540403
13293187768254855391716868343682621871464327068927365344488696920106387479459934
19022318458064628123566860211015471941509792245500514002371079982958434958202268
25888261889146402911244515065676098926190089082345150976126943131636633205284887
31326390781353786477204975846297334399806887561254352384941090195466230979990283
76127235846953251583958558573057923417103371091404520424208625516575504585863215
20566538298150012220090444797043641017790380107963737604968951508669673033395588
07478579182307177073010630518274638724499724926103142267187728755778216279408861
42280516798254093383867870673393814278365925922902775153646837917032614205617526
26436705914356139115556486861766882183007307883212039587445098682824106785807809
32397853674832629758438006892770920774035398212521747280290950387664917449622088
60494631404590043227045615979894739229214501665059733555686216061934862868397922
20026909376499831905151834812207790927045177589476107928127631825962824421289170
51237044843703252629049955436239642265809776661277976317846365001067059284420675
66239803428638800314443889950313894585559514090342603820894305536320052997818565
62070898936319111471087200647024573741589742404915180844573142833220383320678586
78464850524591501501030800709032003522982991154933057167642385358295835829705565
05766649443521796381358840306980046048835884533409785634503451420539779186551571
54853420733376722390995977172103678723741566955295123057065237773951407479126567
73195989346486721824769723739353543937212182511885973507442665977813412325096076
95743085428971731884455144170956680279152219032266400002427921990675542508036352
59261596733824280677715791230492009368819100004556249659565368991089891775683723
08342488151868584570335660857239295993211755458083091779965936375775101341916926
96668445968126977821382186150320654181877765429351131438916715291472068010511296
73907207471199653794505158674137339732504632905095600187935925364861336164967473
67491221939860202942078586249681449263367663118131837216468649301868672162462607
69831234407866023425811245467603191059292608739219283585782571558907167681491682
11388319185968727780198597572226528009694932518776607224826900996018403426372936
66823561368889506531410851635560440277978960931066628445526046708313081985528615
30793487035463179745736151030245065932253955374889691651229226832390170607616000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000

  Posted by Larry on 2024-05-08 07:50:26
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information