摘要:
/***最大余数分摊算法*@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 阅读全文