Created
December 31, 2014 15:54
-
-
Save orekyuu/ca569e67b27cb8e837fd to your computer and use it in GitHub Desktop.
書き初め
This file contains hidden or 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
/** | |
* 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