//Accepted 420K 16MS //考虑 0和n! does not divide // 1和0! divides #include <cstdio> #include <cstring> #include <iostream> using namespace std; <<)+; int pri[imax_n]; int cnt; void prime() { ;i<imax_n;i++) { if ((long long )i*i<…
~>>_<<~ 咳咳!!!今天写此笔记,以防他日老年痴呆后不会解方程了!!! Begin ! ~1~, 首先呢,就看到了一个 gcd(a,b),这是什么鬼玩意呢?什么鬼玩意并不重要,重要的她代表的含义,其实呢,gcd(a,b)就表示 非负整数 a 和 b(不同时为0) 的最大公约数,(数论概论上说:计算 a 与 b 的最大公因数的更低效方法是我女儿四年级老师教的方法,老师要求学生求出 a 与 b 的所有因数,然后找出同时出现在两个表中的最大数字. YES!A good idea f…
Diophantus of Alexandria Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2269 Accepted Submission(s): 851 Problem Description Diophantus of Alexandria was an egypt mathematician living in Ale…
Description Consider a positive integer X,and let S be the sum of all positive integer divisors of 2004^X. Your job is to determine S modulo 29 (the rest of the division of S by 29). Take X = 1 for an example. The positive integer divisors of 2004^1…