上一页 1 ··· 4 5 6 7 8
摘要: 零:素数 质数(prime number)又称素数,有无限个。一个大于1的自然数,除了1和它本身外,不能被其他自然数整除(除0以外)的数称之为素数(质数);否则称为合数。一:最基本的素数判定 先求开方,避免溢出. 开方注意四舍五入 floor(XX + 0.5):#include #includ... 阅读全文
posted @ 2013-04-02 23:14 简单的信仰 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 1 /*杭电1.3.6考试排名*/ 2 #include 3 #include 4 #include 5 typedef struct person 6 { 7 char name[11]; 8 int acnum; //做对了几题 9 int timescore; //时间分-越多越不好10 }Person;11 12 int cmp(const void * a,const void *b)13 {14 Person * c=(Person *)a;15 Person * d=(Person *)b;16 if (c->acn... 阅读全文
posted @ 2013-04-02 20:35 简单的信仰 阅读(227) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2013-03-20 12:45 简单的信仰 阅读(5) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8