Skip to content

Instantly share code, notes, and snippets.

@kozake
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozake/f051fdc73fcd3092cdc4 to your computer and use it in GitHub Desktop.
Save kozake/f051fdc73fcd3092cdc4 to your computer and use it in GitHub Desktop.
しょぼちむ Advent Calendar 2014 のソース(Main)
package syobochim;
import java.util.Map;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
Map m = しょぼちむ.とは()
.flatMap(支払い::どうする)
.flatMap(おこづかい::のこるの)
.collect(Collectors.groupingBy(p -> p.選択肢,
Collectors.summingDouble(
p -> Math.round(p.確率.doubleValue() * 100))));
System.out.println(m);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment