摘要: 分拆素数和Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12329Accepted Submission(s): 5276Problem Description把一个偶数拆成两个不同素数的和,有几种拆法呢?Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。Output对应每个偶数,输出其拆成不同素数的个数,每个结果占一行。Sample Input30260Sample Output32View Cod 阅读全文
posted @ 2012-07-28 21:17 琳&leen 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 最大公约数函数模板View Code 1 __int64 gcd(__int64 a,__int64 b)2 {3 return b==0? a:gcd(b,a%b);4 }相遇周期Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1022Accepted Submission(s): 507Problem Description2007年3月26日,在中俄两国元首的见证下,中国国家航天局局长孙来燕与俄罗斯联邦航天局局长别尔米诺夫共同签... 阅读全文
posted @ 2012-07-28 21:13 琳&leen 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 模运算。。http://www.cnblogs.com/jojoke/articles/1003594.htmlPseudoprime numbersTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 876Accepted Submission(s): 358Problem DescriptionFermat's theorem states that for any prime number p and for any integer 阅读全文
posted @ 2012-07-28 21:06 琳&leen 阅读(181) 评论(0) 推荐(0) 编辑