自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 问答 (1)
  • 收藏
  • 关注

原创 跳台阶问题

def splitnum(n,k,arr)     if n==0 then        puts arr.to_s     end     for i in k..2         arr.push(i)         if n-i>= 0 then             splitnum(n-i,k,arr)         end         arr.po

2016-06-20 10:58:27 174

原创 跳台阶问题:一个台阶共有N级,如果一次可以跳1级,也可跳2级,求总共有多少种跳法

def splitnum(n,k,arr)     if n==0 then        puts arr.to_s     end     for i in k..2         arr.push(i)         if n-i>= 0 then             splitnum(n-i,k,arr)         end         arr.po

2016-06-20 10:56:16 868

原创 全排列,我还是没想明白

#include void print(int arr[],int cnt) {     int i;     for (i=0;i         printf("%d,",arr[i]);     }     printf("\n"); } void swap(int *a,int *b) {     int temp;     temp = *a;     *a=*

2016-06-20 09:56:25 191

原创 最长部分和

#include void print(int a[],int cnt) {     int i;     for (i=0;i         printf("%d,",a[i]);     }     printf("\n"); } void print2(int a[8][8],int cnt) {     int i,j;     for (i=0;i      

2016-06-20 09:19:49 177

原创 和为定值

#include void main() {     int num[100]={1,2,4,5,7,11,15};     int i,j;     for(i=0;i         for(j=0;j             if (i != j && num[i]+num[j]==15) printf("%d+%d=%d",num[i],num[j],15);       

2016-06-19 18:49:25 387

原创 冒泡法排序

#include void swap(int *a,int *b) {     int temp;     temp = *a;     *a = *b;     *b = temp; } void maopao(int b[],int num) {     int i,j;     for(i=0;i         for(j=0;j             prin

2016-06-19 18:39:12 238

原创 回文判断

#include #include void main(){     char str[100]="abcbad";     int begin=0;     int end=strlen(str)-1; //    int i;     int shihuiwen=1; //1:是,0:否     while (begin         printf("%c,%c",str

2016-06-19 17:47:00 156

原创 把字符串转为整数

#include #include int main() {     char str[10]="12";     long num=0;     int i;     for(i=0;i         printf("%c  ",str[i]);             num = (num*10 + str[i]-'0');     }     printf("%ld"

2016-06-19 17:22:00 277

空空如也

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

TA关注的人

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