自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 收藏
  • 关注

原创 Prime Palindromes

题目来源是acm.hit.edu.cn1004这道题的大体意思是说给你一个数,让你判断是不是素数而且有是回文数,这是我ac的代码,你们可以参考参考。#include #include using namespace std;long a;long b;int prime(long n){    for(long i=2;i*i    {    

2009-04-13 16:41:00 325 1

原创 Nearly prime number

题目:Nearly prime number is an integer positive number for which it is possible to find such primes P1 and P2 that given number is equal to P1*P2. There is given a sequence on N integer positi

2009-04-13 16:37:00 432

原创 Sum of Consecutive Prime Numbers

#include #include using namespace std;const int MAXP = 10000;int nprime;int prime[1300];void Init(){    bool flag[MAXP+1] = {0};    nprime = 0;    for (int i =2;i*i        if (

2009-04-08 17:00:00 273

原创 prime cuts

#include #include using namespace std;const int MAXP = 1101;int nprime;           //质数个数int prime[300]={1};      //质数表void Init(){    bool flag[MAXP+1] = {0};    nprime=1;    for

2009-04-08 16:59:00 366

原创 big number

 /* *http://baike.baidu.com/view/2019233.htm *lim(n→∞) √(2πn) * n^n * e^(-n) / n! = 1 *也就是说当n很大的时候,n!与√(2πn) * n^n * e^(-n)的值十分接近 *这就是Stirling公式. *log10(n!) = log10(2*PI*n)/2+n*log10(n/E);

2009-04-08 16:54:00 249

原创 Box of Bricks

这是一道acm题,这是我的AC代码,可以参考参考。#include using namespace std;const int MAX =50;int main(){    int Bricks[MAX]={0};    int N;    long sum=0;    int average =0;    int j=1;    cin>>N;

2009-04-08 16:52:00 256

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除