![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
高精度
阿克劳斯
太阳就在眼前,何须留恋蜡烛
展开
-
高精度模板
#include<bits/stdc++.h>using namespace std;#define ll long longconst int maxn = 1e4 + 5;inline __int128 _read() { __int128 sum = 0; char ch = getchar(); while (!(ch >= '0' && ch <= '9')) ch = getchar(); while (ch >= '0' &原创 2021-04-14 21:51:50 · 84 阅读 · 0 评论 -
洛谷 - P1517 高精求小数幂(Python高精)
Link几个函数介绍Docs of Python 3.9getcontext()官方叫做上下文,其实可以看做decimal包在当前文件的一个全局设置,例如:from decimal import Decimal, getcontext, MAX_PREC# getcontext().prec = MAX_PRECprint(getcontext())'''输出:Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999, Emax原创 2021-09-14 22:12:20 · 470 阅读 · 0 评论 -
洛谷Luogu - P1591 阶乘数码(python高精度)
Linkpython做高精度简直不要太爽代码t=input()a=[1,1]for i in range(2,1001): a.append(a[i-1]*i)for i in range(int(t)): b=input().split() n=int(b[0]) aa=int(b[1]) cnt=0 for j in str(a[n]): if(j==str(aa)): cnt+=1 print(cnt)原创 2021-09-14 10:53:42 · 189 阅读 · 0 评论