随笔分类 -  数学题目

摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=4627The Unsolvable ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 243Accepted Submission(s): 143Problem DescriptionThere are many unsolvable problem in the world.It could be about one or about ze 阅读全文
posted @ 2013-07-30 20:59 free斩 阅读(137) 评论(0) 推荐(0)
摘要:转载请注明出处:http://blog.csdn.net/lyy289065406/article/details/6648539優YoUhttp://user.qzone.qq.com/289065406/blog/1309237394大致题意:求A^B的所有约数(即因子)之和,并对其取模 9901再输出。解题思路:要求有较强 数学思维 的题应用定理主要有三个:要求有较强 数学思维 的题应用定理主要有三个:(1) 整数的唯一分解定理: 任意正整数都有且只有一种方式写出其素因子的乘积表达式。 A=(p1^k1)*(p2^k2)*(p3^k3)*....*(pn^kn) 其中pi均为素数(2) 阅读全文
posted @ 2013-07-24 23:47 free斩 阅读(265) 评论(0) 推荐(0)
摘要:比赛时一直错贴的叶找的代码:#include #include #include using namespace std; #define MAXN 10000 const int mod[20]={1,1,2,6,4,2,2,4,2,8,4,4,8,4,6,8,8,6,8,2};//列出钱20个的阶层最后一位 int ld(char* buf) { int len = strlen(buf), a[MAXN], i, c, ret = 1; if(len==1) return mod[buf[0]-'0'];//如果是个位数直接输出 for(i=0;... 阅读全文
posted @ 2013-04-23 21:47 free斩 阅读(170) 评论(0) 推荐(0)
摘要:FibonacciTime Limit:1000MSMemory Limit:65536KTotal Submissions:6881Accepted:4873DescriptionIn the Fibonacci integer sequence,F0= 0,F1= 1, andFn=Fn− 1+Fn− 2forn≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternative formula for the Fibonacc 阅读全文
posted @ 2013-04-09 21:14 free斩 阅读(217) 评论(0) 推荐(0)
摘要:来源:http://my.oschina.net/dianpaopao/blog/83844#include<stdio.h> #include<stdlib.h> #define NMAX 10000000 #define SQRN 10000 int main() { int n; scanf("%d",&n); static char a[NMAX]; unsigned long k,i; for(k=2;k<=SQRN;k++) if(!a[k]) for(i=2*k;i<n;i+=k) a[i... 阅读全文
posted @ 2012-11-13 11:14 free斩 阅读(358) 评论(0) 推荐(0)
摘要:来源:http://my.oschina.net/dianpaopao/blog/83844#include<stdio.h>#include<stdlib.h>#define NMAX 10000000#define SQRN 10000int main(){ int n; scanf("%d",&n); static char a[NMAX]; unsigned long k,i; for(k=2;k<=SQRN;k++) if(!a[k]) for(i=2*k;i<n;i+=k) a[i]=1;... 阅读全文
posted @ 2012-11-13 11:14 free斩 阅读(311) 评论(0) 推荐(0)
摘要:题目来源,多校联合赛:http://acm.hdu.edu.cn/diy/contest_showproblem.php?cid=16820&pid=1002(重开,密码:52acm8)注意:貌似过了这段时间不能提交了的说。。。。。。K次方Time Limit : 2000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 31Accepted Submission(s) : 15Font:Times New Roman|Verdana|GeorgiaFont Size:←→ 阅读全文
posted @ 2012-08-25 10:13 free斩 阅读(862) 评论(0) 推荐(0)
摘要:思想深奥,代码操简单的数学问题。题目链接:http://poj.org/problem?id=3219CSUST 2012年暑假8月组队后个人赛第12场:http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=11900#problem/DD -Binomial CoefficientsTime Limit:1000MSMemory Limit:131072KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 3219DescriptionThe binomial coe 阅读全文
posted @ 2012-08-22 21:03 free斩 阅读(263) 评论(0) 推荐(0)
摘要:题目链接:http://poj.org/problem?id=15792012年暑假组队后第一场个人训练赛FunctionRunFunTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:13148Accepted:6836DescriptionWeallloverecursion!Don'twe?Considerathree-parameterrecursivefunctionw(a,b,c):ifa<=0orb<=0orc<=0,thenw(a,b,c)returns:1ifa>20orb>20orc&g 阅读全文
posted @ 2012-08-14 16:25 free斩 阅读(266) 评论(0) 推荐(0)
摘要:递归和打表找规律或者记忆化搜索题目链接:http://poj.org/problem?id=15792012年暑假组队后第一场个人训练赛FunctionRunFunTimeLimit:1000MSMemoryLimit:10000KTotalSubmissions:13148Accepted:6836DescriptionWeallloverecursion!Don'twe?Considerathree-parameterrecursivefunctionw(a,b,c):ifa20orb>20orc>20,thenw(a,b,c)returns:w(20,20,20)if 阅读全文
posted @ 2012-08-14 16:25 free斩 阅读(197) 评论(0) 推荐(0)
摘要:水鸟第一篇解题报告,大牛们直接忽略即可题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1060LeftmostDigitProblemDescriptionGivenapositiveintegerN,youshouldoutputtheleftmostdigitofN^N.InputTheinputcontainsseveraltestcases.ThefirstlineoftheinputisasingleintegerTwhichisthenumberoftestcases.Ttestcasesfollow.Eachtestcaseconta 阅读全文
posted @ 2012-05-08 15:12 free斩 阅读(335) 评论(0) 推荐(1)
摘要:水鸟第一篇解题报告,大牛们直接忽略即可题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1060LeftmostDigitProblemDescriptionGivenapositiveintegerN,youshouldoutputtheleftmostdigitofN^N.InputTheinputcontainsseveraltestcases.ThefirstlineoftheinputisasingleintegerTwhichisthenumberoftestcases.Ttestcasesfollow.Eachtestcaseconta 阅读全文
posted @ 2012-04-20 23:12 free斩 阅读(175) 评论(0) 推荐(0)