Last active
August 29, 2015 14:10
-
-
Save kozake/f051fdc73fcd3092cdc4 to your computer and use it in GitHub Desktop.
しょぼちむ Advent Calendar 2014 のソース(Main)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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