Skip to content

Instantly share code, notes, and snippets.

@nokok
Created October 23, 2013 15:40
Show Gist options
  • Save nokok/7121091 to your computer and use it in GitHub Desktop.
Save nokok/7121091 to your computer and use it in GitHub Desktop.
話題のぬるぽ
import java.util.*;
public class NullPo{
static String out = "";
public static void main(String[] args){
char[] base = {'n','u','l','l','p','o'};
while(isEnd()){
char c = base[new Random().nextInt(5)];
System.out.print(c);
out += c;
}
System.out.println("\n\n");
System.out.println(out.length() == 5000 ?
"成功です!ぬるぽを吐きませんでした!"
:
out.length() + "回でぬるぽを吐きました...");
}
public static Boolean isEnd(){
return !out.endsWith("nullpo") && out.length() < 5000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment