数论相关的题
文章平均质量分 54
然然zl
这个作者很懒,什么都没留下…
展开
-
Matrix Power Series 矩阵快速幂
http://poj.org/problem?id=3233 Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. Input The input contains exactly one test case. The first line of input contains three positive integers n (n ≤ 30), k (k ≤ 1原创 2021-01-18 16:20:56 · 76 阅读 · 0 评论 -
洛谷 P4942 小凯的数字 逆元
题目背景 NOIP2018 原创模拟题T1 NOIP DAY1 T1 or DAY 2 T1 难度 是否发现与NOIP2017 DAY1 T1 有异曲同工之妙 #10 输入格式存在问题,对于 python 选手请特判空行。待修复。 题目描述 小凯有一天突发奇想,写下了一串数字:l(l+1)(l+2)…(r-1)rl(l+1)(l+2)…(r−1)r 例如:l=2,r=5l=2,r=5时,数字为:23452345 l=8,r=12l=8,r=12时数字为:8910111289101112 小凯很喜欢数字9,所原创 2020-07-27 09:54:04 · 290 阅读 · 0 评论 -
牛客 Celestial Resort 质因数分解求最小公倍数 除法取模
题目描述 Madeline来到了Celeste山的天空度假山庄(Celestial Resort)。工作人员Oshiro先生希望Madeline住在这里,而这里却因为早就没有客人来光顾而脏乱不堪。 虽然Madeline不想留在这里,她的目标是登上Celeste山,但她不忍心看到Oshiro先生失落的样子,于是想要帮助Oshiro先生来整理天空度假山庄。 Madeline发现这里有n种书,每一种书都有无限本,第i种书的厚度是ai ,她想把这 n 种书在摆成一排,每一种书叠 b i 本,使得每一种书叠起来的高度原创 2020-07-22 10:55:13 · 353 阅读 · 1 评论