posts - 1, comments - 0, trackbacks - 0, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

test post.

Posted on 2006-04-04 21:41 BinGo and WhitNey's 阅读(123) 评论(0)  编辑 收藏 引用

 1 class NewAlbum
 2 
 3 public
 4   int leastAmountOfCDs(int nSongs, int length, int cdCapacity) 
 5   { 
 6     int m = (cdCapacity+1)/(1+length);
 7     if (m%13 ==0 ) m--;
 8     int result = nSongs/+ (nSongs%m? 1:0);
 9     if ((nSongs/==0 || nSongs%m+1==m ) && nSongs%m%13==0 && nSongs%m )
10       result++;
11     return result;
12   } 
13 };



只有注册用户登录后才能发表评论。
网站导航:   博客园   博客园最新博文   博问   管理