private static int func(int count) {
  // TODO Auto-generated method stub
  int cou = 0;
  if(count==1){
   cou=1;
  }
  else if(count==2){
   cou=2;
  }
  else{
   for(int i=1;i<count;i++){
    cou+=func(count-i);
   }
   cou=cou+1;
  }
  return cou;
 }

posted on 2017-08-16 14:09  blythe  阅读(288)  评论(0编辑  收藏  举报