Skip to content

Instantly share code, notes, and snippets.

@teruteru128
Created March 17, 2016 08:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teruteru128/ad3cadd65d68ad845e2e to your computer and use it in GitHub Desktop.
Save teruteru128/ad3cadd65d68ad845e2e to your computer and use it in GitHub Desktop.
ズンドコキヨシ with Java ref: http://qiita.com/teruteru128/items/9149a404d7a36a09cd8e
import java.util.Random;
public class Zundoko {
public static void main(String[] args) {
String[] zundoko={"ズン","ドコ"};
int z=31;
Random r=new Random();
while(true){
z|=r.nextInt(2);
System.out.println(zundoko[z&1]);
if((z&=31)==1){
System.out.println("キ・ヨ・シ!");
break;
}
z<<=1;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment