Instantly share code, notes, and snippets.

Embed
What would you like to do?
書き初め
/**
* 2015年書き初め
* 噂のセミコロンレスJavaにチャレンジ
*/
public class Main {
public static void main(String[] args) {
if (java.util.stream.IntStream.range(0, 2016)
.mapToObj(i -> (i % 3 == 0 && i % 5 == 0) ? "FizzBuzz" : ((i % 3 == 0) ? "Fizz" : (i % 5 == 0 ? "Buzz" : String.valueOf(i))))
.peek(System.out::println).allMatch(i -> true)){}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment