fork download
  1. #2^^5
  2. from decimal import *
  3. getcontext().prec = 100
  4. from decimal import localcontext
  5. with localcontext() as ctx:
  6. print(ctx.Emax) # デフォルトの指数上限は999999なので、今回の計算だと足りない
  7. ctx.Emax = 10**10**5 # 指数上限を増やす
  8. a = ctx.power(2,2)
  9. b = ctx.power(2,a)
  10. c = ctx.power(2,b)
  11. d = ctx.power(2,c)
  12. print(d)
Success #stdin #stdout 0.15s 67044KB
stdin
Standard input is empty
stdout
999999999
2.003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348E+19728