小寒的blog
Programming is a darned hard thing—but I am going to like it.
摘要: /***最大余数分摊算法*@authorxhan*{@link=http://en.wikipedia.org/wiki/Largest_remainder_method}*/publicclassShareCalculator{publicstaticdouble[]calculate(double[]votes,doubletotalSeats){double[]seats=newdouble[votes.length];double[]reminders=newdouble[votes.length];doubletotalVotes=0;for(doublevote:votes){to 阅读全文
posted @ 2012-01-23 14:01 xhan 阅读(942) 评论(0) 推荐(0) 编辑