随笔分类 - ACM-基础数论
摘要:欧拉筛,题解来自:https://www.luogu.org/space/show?uid=34195 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <vector> 5 #include <c
阅读全文
摘要:太强了,dalao的题解 https://www.luogu.org/blog/jingyangzhi/solution-p1582
阅读全文
摘要:PDF (English) Statistics Forum Time Limit: 2 second(s) Memory Limit: 32 MB Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-
阅读全文
摘要:1 #include <iostream> 2 #include <algorithm> 3 #include <cmath> 4 #include <stdio.h> 5 #include <cstring> 6 #include <string> 7 #include <cstdlib> 8 #
阅读全文
摘要:。。 有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛? Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0<n<55),n的含义如题目中描述。n=0表示输入数据的结束,不做处理。 Output
阅读全文
摘要:题意:给你一个数M和H对(Ai,Bi)(1<=i<=H),让你求(A1B1+A2B2+ ... +AHBH)mod M. Sample Output ... _(:з」∠)_,同余定理...矩阵快速幂还不会啊。。。
阅读全文
摘要:Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个
阅读全文
摘要:Problem DescriptionThe Sky is Sprite.The Birds is Fly in the Sky.The Wind is Wonderful.Blew Throw the TreesTrees are Shaking, Leaves are Falling.Lover
阅读全文
摘要:Description In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture: Ev
阅读全文

浙公网安备 33010602011771号