随笔分类 -  数学

摘要:要求: 输入正整数n,(2<=n<=100)把阶乘分解成素数因子相乘的形式,从小到大输出各个素数的指数。sample input:523sample output:5!=3 1 153!=49 23 12 8 4 4 3 2 2 1 1 1 1 1 1 1code:View Code #include<stdio.h>#include<string.h>//素数判定int isprime(int n){ if(i%2==0&&i!=2) return 0;for(i=2;i*i<=n;i++) if(n%i==0) return 0; 阅读全文
posted @ 2012-04-06 16:53 'wind 阅读(229) 评论(0) 推荐(0)
摘要:Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summed and the process is repeated. This is cont 阅读全文
posted @ 2012-04-06 16:51 'wind 阅读(192) 评论(0) 推荐(0)
摘要:Problem DescriptionIgnatius is poor at math,he falls across a puzzle problem,so he has no choice but to appeal to Eddy. this problem describes that:f(x)=5*x^13+13*x^5+k*a*x,input a nonegative integer k(k<10000),to find the minimal nonegative integer a,make the arbitrary integer x ,65|f(x)ifno exi 阅读全文
posted @ 2012-04-06 16:49 'wind 阅读(214) 评论(0) 推荐(0)
摘要:Problem DescriptionWe all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recently, it is reported that he hides in Hang Zhou of China! “Oh, God! How terrible! ”Don’t be so afraid, guys. Although he hides in a cave of Hang Zhou, he dares not to go out. Laden 阅读全文
posted @ 2012-04-06 16:47 'wind 阅读(161) 评论(0) 推荐(0)
摘要:Problem DescriptionPeople in Silverland use square coins. Not only they have square shapes but also their values are square numbers. Coins with values of all square numbers up to 289 (=17^2), i.e., 1-credit coins, 4-credit coins, 9-credit coins, ..., and 289-credit coins, are available in Silverland 阅读全文
posted @ 2012-04-06 16:46 'wind 阅读(174) 评论(0) 推荐(0)
摘要:Problem Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given an positive integer N, we define an equation like this:N=a[1]+a[2]+a[3]+...+a[m];a[i]>0,1<=m<=N;My question is how man 阅读全文
posted @ 2012-04-06 16:44 'wind 阅读(182) 评论(0) 推荐(0)
摘要:DescriptionYour task in this problem is to determine the number of divisors of Cnk. Just for fun -- or do you need any special reason for such a useful computation?InputThe input consists of several instances. Each instance consists of a single line containing two integers n and k (0 ≤ k ≤ n ≤ 431), 阅读全文
posted @ 2012-03-17 19:03 'wind 阅读(221) 评论(0) 推荐(0)
摘要:DescriptionPythagorean Theorem is "humanity's greatest scientific discoveries of the ten" is a basic elementary geometry theorems."This theorem has a very long history, almost all ancient civilizations (Greece, China, Egypt, Babylon, India, etc.) have studied this theorem. Pythago 阅读全文
posted @ 2012-03-16 17:13 'wind 阅读(448) 评论(0) 推荐(0)