
python
FlashCanSavetheWorld
不想起床
展开
-
python n进制度转n进制
def DecimalToany(n, x): # n为待转换的十进制数,x为机制,取值为2-16 a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N' , 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e',原创 2020-09-18 08:23:45 · 448 阅读 · 0 评论 -
python快速幂
mod = 1e9+7def fastPow(b, e): result = 1 while e != 0: if (e&1) == 1: result = (result * b) % mod e >>= 1 b = (b*b) % mod return int(result)原创 2020-08-09 14:11:04 · 363 阅读 · 0 评论 -
python大数处理
题目描述Today, ZLZX has a mysterious case: Orange lost his down jacket hanging in his dorm room. Under the expectations of everyone, detective Groundhog took his small spoon of the artifact and started the journey to solve the case.After an in-depth investig原创 2020-08-09 13:07:21 · 277 阅读 · 0 评论