随笔分类 - 数论
摘要:1 #include<iostream> 2 #include<cstring> 3 #include<string> 4 using namespace std; 5 int main() 6 { 7 char str1[256],str2[256]; 8 int a[256],b[256],c[
        阅读全文
            
摘要:用高精度方法,求s=1+2+3+.....+n的精度值(n以一般整数输入,n<=10^100) 1 #include<iostream> 2 #include<cstring> 3 #include<string> 4 using namespace std; 5 int main() 6 { 7 
        阅读全文
            
摘要:半个小时看懂了大佬写的10行代码
        阅读全文
            
摘要:#include #include #include #include using namespace std; typedef __int64 int64; const int N = 10; const int MOD = 9973; int k,n; int arr[N],f[N]; struct Matrix{ int mat[N][N]; Matrix operato...
        阅读全文
            
摘要:推论:小于N且与N互质的所有数的和(包括1)为 N*vola(N)/2 Given a positive integer N, your task is to calculate the sum of the positive integers less than N which are not c
        阅读全文
            
摘要:The input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not nece
        阅读全文
            
摘要:Apple Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 806 Accepted Submission(s): 267 Problem Des
        阅读全文
            
摘要:It's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the fi
        阅读全文
            
摘要:Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his
        阅读全文
            
摘要:欧几里得算法 欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。基本算法:设a=qb+r,其中a,b,q,r都是整数,则gcd(a,b)=gcd(b,r),即gcd(a,b)=gcd(b,a%b)。 证明略去了。 基本代码实现: 扩展欧几里得算法 扩展欧几里德算法是欧几里得算法的扩展。
        阅读全文
            
摘要:Ignatius's puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9783 Accepted Submission(s): 68
        阅读全文
            
摘要:A Simple Math Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1795 Accepted Submission(s)
        阅读全文
            
 
                    
                
 
 浙公网安备 33010602011771号
浙公网安备 33010602011771号