摘要: 唯一不可能错过你一直都在 阅读全文
posted @ 2013-02-20 22:21 wouldguan 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.dewen.org/q/620#include <stdio.h>int judge(int num){ int min = 1; if(num < 0) { return 0; } else if(num == 0 || num == 1) { return 1; } else { int current = 2; while(1) { if(current * current < num) { min = current; current = min * 2; } ... 阅读全文
posted @ 2013-02-20 18:37 wouldguan 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 出处: http://www.cnblogs.com/pkuoliver/archive/2010/10/27/Convert-m-number-to-n-number.htmlC语言版:#include <stdio.h>void m2n(int m, char* mNum, int n, char* nNum){ int i=0; char c, *p = nNum; while(*mNum!='\0') i = i*m + *mNum++ - '0'; while(i) { *p++ = i%n + '0'; i /= n; } 阅读全文
posted @ 2013-02-20 17:13 wouldguan 阅读(280) 评论(0) 推荐(0) 编辑
摘要: public class Hello{ private static void quickSort(int data[], int low, int hight) { int i=low,j=hight; int mid=data[(low+hight)/2]; while(i <= j) { while(data[i]<mid) i++; while(data[j]>mid) j--; if(i<=j) { int temp = data[i]; data[i] = data[j]; data[j] = t... 阅读全文
posted @ 2013-02-20 10:28 wouldguan 阅读(2304) 评论(0) 推荐(0) 编辑