fork download
  1. # Last 3000 digits of the smallest known Goliath number
  2. # https://g...content-available-to-author-only...m.com/wiki/Goliath_Numbers
  3. def last_digits_of_power_of_two(n, digits=3000):
  4. result = pow(2, n, 10**digits)
  5. return str(result).zfill(digits)
  6.  
  7. n = 588568772411840194131602153234493556710295079477857120984192265232391789419880438906921921990316092705948991515485776046444825429596818069592027979684946307570829019934235587058964782020037324162761409406370304631006006530409780809946729268241385664636648641912737686541059272800551182722417047864174183908059599824896209575993796189207053873038187955600142079762745184357994797279737875654286166321802295860099158800366374549843738290997160174386317991999450594063920532823459585939820429244855525411860118417926631171779654659793784400589805837899013847271565554504341084459889511197310543346435630135802812930095615797602907232971854521270697049700951649924719937092125837323551211554870414993671041414677464208407554430043300186530390231964337897297668380866060195562956400040979303872526009423267268857697252474056885075564671228797634014731591716426588030909430219790056441909610707855080485779640350944209727501475184963379375681750980592735297610283090441817434192039935554462701881939443130632625602442747324700096861495216438083158096868200763242968319161648206544769058896421775705966984874767378351763642049808812344048530780627953430373753224986059653183547133795800568968483813955327073093092246118831867546968452807830777287523193646575447905175217058503452352430715087565242119026575975104684568694694282933761495934163898498895833912553641354411772371648959151433333377231917425854508829475647789957968940935660181063879064193907748179315923988850675337823763051948576639548553667740177679688563991034405660758518942653894203812227005139814690072143187517752829467362462871190565451799279855360842766034929939516723079856096501284206250470569504890716117396513914115620269557497773180198269629775587796242071327824364351971556771023719749743515764136906046632463733203007509819711888977867406538980331384029470004984193019899281555658286058672484322587527232862069965592949727958214753463780884938892181903933847487098166096452665106632745683143664200122860959024860772469439488504
  8. print(last_digits_of_power_of_two(n))
Success #stdin #stdout 0.65s 63896KB
stdin
Standard input is empty
stdout
526312813326861934772547443985657180615834393915303651739365966764913689666906857103437433952572330062172419948171620287870938321358678054214666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666078234588744450938855610583614874303813304584517866574928580118193980645871380236062983494577171166081726912561479160307262526558706166339019803552121556247993869517437635670427239637693996248566659975955537225581597221119037007515448655703143261085245598747274573752756680377974621749242013720108045755385225521176419546933384638185058579856507537806534315915054788789587608903221472219636575541108136745645152701233644383820395869640359308016097091004689649037277454643179004357908744525436586694919697378497427737495408122949215476966535701216303959318633217175218622112045755085770108829472781943468780443957653947359635990260755024448193816779110831226779001454267495373520014202123345228304269499875202476577446801596369845766925623678083295001226944536347215101054946110930290823445445380333388410014932601384760565326753710703357980227592750705217110016