Skip to content

Instantly share code, notes, and snippets.

@sasamijp
Last active December 17, 2015 20:49
Show Gist options
  • Save sasamijp/5670218 to your computer and use it in GitHub Desktop.
Save sasamijp/5670218 to your computer and use it in GitHub Desktop.
素数吐いてる
public class Sosu {
public static void main(String[] args){
for(int n = 2 n<100; n++){
boolean sosu=true;
for(int i=2;i<n;i++){
if(n%i==0) {
sosu=false;
break;
}
}
String crlf = System.getProperty("line.separator");
if(sosu){
System.out.println(crlf+"               ,, -―-、"+crlf+"             /     ヽ "+crlf+"       / ̄ ̄/  /i⌒ヽ、|    "+n+"ーー!!!! "+crlf+"      /  (゜)/   / /"+crlf+"     /     ト、.,../ ,ー-、 "+crlf+"    =彳      \\‘゚。、` ヽ。、o "+crlf+"    /          \\゚。、。、o"+crlf+"   /         /⌒ ヽ ヽU  o"+crlf+"   /         │   `ヽU ∴l "+crlf+"  │         │     U :l "+crlf+"                    |:! ");
}else{
;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment