>>> from math import factorial >>> factorial(3) 6 >>> factorial(2080) Traceback (most recent call last): File "", line 1, in ValueError: Exceeds the limit (4300 digits) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit >>> import sys >>> sys.set_int_max_str_digits(10000) >>> factorial(2080) 1983139957541900373849131896861394382816980271968500448007830224659188117091104077363443471149808391754432725119796752816612883730076121498819862147148750136562486834981232228034250866401680758993895452559767354656144561202939786741859267267046733243697404904796081715088982777999673285907130785057091829938765509384624420673735174233336321895876160251134269699573364669184610753066208127155945608366998155778005118192701851183847145227092098535075854953044422227585449781064911285705586894231854231640119773470766486376491792804513130800281008248067917825596808902488545791260441007625140050612707408330247713116961056194891262164740251347332311191035378374728957175659362221241238233915372110294069646693260934454769582457834102105799750007913369986154184744247436635658625699083511528722604043477828424781356569042535974518212376962302249165838607415835478290537691341014733845181982098600087059914868250606695880751978786075397461050587988760687030604071102669828573475237894884927133969518559809481629714578331421585319184908070133132276293089946756556821514458416609528066427183459281805857648993633443232658221239619739623256832051445150881611919698017963405097186369234576910761427475683519405159433006674285933539250813618004374109355395057895541186481772780208515650888491198505054566439518264786108239986993122729924684949445282134134777535779925063137247190961297861983574409893851957046745265184072896518186295859587390766743390556087966254524242813671910060151413459027947930120455155382729543089287704377146267206039715632724556137334352326111885315867217002117709820876587341774728099227617442149591079208792286773838053262852834700405081708253698167435424988362002464308663864079093408553392793182181273490272097224419304985605941852290329560642702858779756175479733520390247220190900283957135821863256823686408428626255368279480617019461540672017296022668441160210200407440526223162288648531468134798895980340632457021306031745440507192692194874628532994912255510775399841417925192801569573620468652391879150936918127461102493257267268736619971035941035160155452638441536460299835886917616202643272374475260948289174853824684992141136858085867374523398497281695777078768819904094058626976975865910084202745287248045018841348814773266488071280754437714544099591028327335162702877037610413835877378318377167786835674205764415820404904318324066243404375197400059825202209162776406953576568212559626154950228423583769823314062578228199612841133693891105556244047222711975281884643995346043630937381075387322498192630596478600094137087242056927696775928088503977083955755784296423914942213239161503515444797175807121560684524913007695251416482930675014694983827838545528455918395119923318976767233742325847346188905461528510836680554847310025608326012995572828286363027180134804381394393601828247058900575481578617006810131280910790342406445273519818265744015457027065221068371772202996290481172545441999442126685067692125603227057777560957073501481791253058247475691913703191001054527606943386879323436628142825902766438026617306113922899162389604883843896576531915647782927211241977683131343620767071143386121457279959645638565270897916133825000157004609960128069064131430002386732000578319769679971054907090309030269904295773967801803578781597443697998232230489391329735119351242170412040405533301368888406433075878467230468000967089552983679021992888919699563937238051424824746692921592758891617549968494121030701095598208265810242680413881677123139821476236299867266675165621258622122168479826742830975810345594600002502836497679703704507989101507977349901551362415484483778249439262029058886745100584838021625426381386442800813611781826829624934718286960783462051479686144120657381017184651654246317074132909577641427671757507340865102228266860225692509276301386658248214117153076390541452974639530108406364153915764445240924140804509147333747387582814283202870203178163801940996167628913053617384204515350350491281390349691090969750572003072485634893665730837584670350096906694763331954550877689375998121855998807417127703998958948177879126043164846195175280680221422720247777168312724105828130776806506753985664809261082350484053703380205112019164637216510155084824618529483438581942635229021035174733269476562028669803367145546954915397859456000767556963281844333396787851690206377793213796830548954745894810016427384872353852177580360550273785417084350781490803483427021696507538186170625946673688028370098945934038673015720772629430786275944094115103778563533513141455473576409015521840100207994336393015174827289960131562200506229100863280545650426980117931536515416353027163933545168066512372720885181415996186515981024084915764138904299881043127885083561300017653078044818429090669069376081060201923017706641093487298913096244863337245341929442695477956845878769061714199374489895088044621383894269815131907008523894181191102659594835030614954179755027880820300615081575671133311474748170728247716842776628683506278766833030606180174315302959204611529614974222462859788405896892685979777693230645066508586237792954985476843876793496918331781574460828476326781808575939876350498757134724813553347907354807667679963211019344407535825045298982522427886227597763932431651314400614312323345417535226329569696476374360668019562193743293610177146110938075055496838145590320870049561364200859077888134958687451141677727807626759192419807068822226457980495595440285175754602625773134600142550807365386831278688018963608868547572155037382126301413614266265253602918400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 >>> factorial(2081) 4126914251644694677980043477368561710642135945966449432304294697515770471666587584993325863462751263240974500974297042611371411042288408839044133128216549034186535103595944266539276052981897659466296436776875865039436831863317696209809135182724251880134299606880646049100173161017320107972739163703808098102571025029403419422042897579572885865318289482610415244812171876573174977130779112611522811011723162174028650959012552313585909217578657051492854157285442655605320994396080385553326326896488656043089248592665058149479420826191825195384778164229336995066959326078663791612977736867916445325044116735245490996395957941568716564824463053798539588544622397810959882547132782403016764777889361521958934768676004600375501094752766482169279766467722941186858452778915638805600079792787491271739014477360951970003020177517362972399956458550980514110142032353630322608935680651661131823704747186781171682840829512534127844867853822902116446273604610989710687071964655913261401970059255533365790568122963531271436037507688319049223793693947048266965920179200394745571587964964427906234968778765437989767555751195367161758399648678155997467499057358984634404891575381846007244834377154551294530576897403882136780086889189027695180943139067102521568577115480621209068569155613921069498950184089018552760637509019891247412932688400973269379795632121134472051958024056388611404390460850787818346989105922614276896848055697654345681683801360185592995747219057775664949295251244835175091408237159642580667178351460179168807712808841382055768648231699801321792787190638833342319678581406954137244178258233209174492671897113299035833496748776356988839996749011542975034875945886433119400781327128226329501148593383199610402612119230133256234324016573675045964994616175815697464649120672601173325455932104465217263490914799645297437450091415939971237421389599164017499466138467993023173026054397427047883735070400722677593985188516502535088856143061337852062261695467992457534101977162412403717923607069990702326220066282704195265627500513099726623246554288468373186240906159725793294168283496940596837373883958480675559317700649811283018033389772870809169468645705801676690006383192272843208912100917914220419736002739086776958885225912942763181684208846883543167561676335249984883966271248929949184473584687115267271192460824280542886164405038022195749322262605886432381852524504785789524496245797267737702870392838450336582028451425349477825002316564225292883394322399216987390662543862270463620561601944154315116795980690017881018118738864271271966795899278550720466536990706352176776311711927787120858166994745750695088815640622922854619967784496343969013818197700978734705580261345732013244716766180244560426790652613417780088327419112265440831051132234637252163290926433043787055663921459561860527917681733085404582129572097577165101991171883195575354702547812614194741811013296166073322725043281657954435280491320067064800839065631625867313380315507235104351669956583607597614212996914872416340473194471950049188095872071623165220703656957533390614023073553156932767763279148775762916463036271526594555558596326074816275049386518752599596022573854328738563474489825326726593327026511722457505834966789293203483440704019765261654933091991670839505626995553247444504280335534321271648423357178783369934956627456083914800148656773787230903090306603910012513359759036044767201841894792553392385015060297867969834531253456121484436265864888979939871401151115017941287770093253968492047740023781951019657839192636232606519451831260661329182362605208402751671463409081125320238100865145128385186623210742537083104282471543316554317047923002512299665187468493126117981632449489148755165390384529129226865915088009896761260092486585831270584831071810984927372776340277737023336129666111803983185635814533577795551968716763640224862155593643804298705810546363137014183535601528313559836523345172892813758871839213024835768064577776529596444079372356573317707160308050940338393842606213718385873013698998551662831802493797420376471591452091582333518235042752021833571158166461295826044932159759095540780680835624287258778864228340146534340555044168468072312371357315756734206838111881610047557632731520031159855035689022623911592774198619933780725581661860807029883213178942945527937597286040589518057798715519367319472187677911204372374826207099644185387919368366381544730305119747452952533976282362049011632150432186965421072595027944787038175906488734478545714927841845466240239659853530963190713240847368840512507161300949248532836214033864578815590407033780939253462758896486815498538545625415527488581430649528145707494746412247632162062526688064139756511120709705173059848052450749128858891065336736055411267150937682333371624686280201799847520115547069038153285560604807556555170249289628196273718417427248898313471678220857099883975485289498484738223791058684634616851698709719648070213019987045579984758971628421178950943285483498749818164290376566113779536691460942750145458104796593128761356945211219672671433679523917379612972383404367960847139324777312107607267087048437456452984059236032943646530882685387913597362337004516995205354756442003442131255712082051919267182629172431239630946743390266385267678383944881813890805991834538367335044550148708925179794002778641056862134190488920180973457730573137198901987741085208849028585825831351567671285879425618510219053259057411334111233450745328064233893102896648230127369995890949767463270055447497654632792204833241731288097992747673190400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 >>> x_2080 = str(factorial(2080)) >>> x_2081 = str(factorial(2081)) >>> len(x_2080) 6001 >>> len(x_2081) 6004