Skip to content

Instantly share code, notes, and snippets.

@Yuiki
Last active August 29, 2015 14:16
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 Yuiki/e9b1246f46a0e0894462 to your computer and use it in GitHub Desktop.
Save Yuiki/e9b1246f46a0e0894462 to your computer and use it in GitHub Desktop.
縦書き俳句プログラミング in Semicolonless Java.
/*
* Title:縦書き俳句プログラミング in Semicolonless Java.
* Description:初めてのSemicolonless Java。
* Author:ゆいき @_yuiki
*/
public class Main {
public static void main(String[] args) {
for (String haiku : new String[]{"古池や 蛙飛び込む 水の音"}) {
for (String[] splitHaiku : new String[][]{haiku.split(" ")}) {
for (int colSize : new int[]{splitHaiku.length}) {
for (int rowSize : new int[]{-1}) {
for (int i : new int[]{0}) {
while (i < colSize) {
if (splitHaiku[i].length() > rowSize) {
if (System.out.printf("", rowSize = splitHaiku[i].length()) == null) {
}
}
if (System.out.printf("", i++) == null) {
}
}
}
for (StringBuilder newHaiku : new StringBuilder[]{new StringBuilder()}) {
for (int i : new int[]{0}) {
while (i < rowSize) {
for (int j : new int[]{0}) {
while (j < colSize) {
for (int index : new int[]{(colSize - 1) - j})
if (i < splitHaiku[index].length()) {
if (newHaiku.append(splitHaiku[index].charAt(i)) == null) {
}
} else {
if (newHaiku.append(" ") == null) {
}
}
if (System.out.printf("", j++) == null) {
}
}
}
if (newHaiku.append("\n") == null) {
}
if (System.out.printf("", i++) == null) {
}
}
}
if (System.out.printf(newHaiku.toString()) == null) {
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment