Skip to content

Instantly share code, notes, and snippets.

@kewang
Last active September 13, 2016 15:48
Show Gist options
  • Save kewang/e7e066818ab96590952fcfc11f788399 to your computer and use it in GitHub Desktop.
Save kewang/e7e066818ab96590952fcfc11f788399 to your computer and use it in GitHub Desktop.
import java.util.Random;
public class Main {
public static void main(String[] args) {
long start = System.currentTimeMillis();
Random r = new Random();
for (int i = 0; i < 1000; i++) {
for (int j = 0; j < 1000; j++) {
if (r.nextInt(4) == 0) {
System.out.print("O");
} else {
System.out.print("#");
}
}
System.out.println("");
}
System.out.println(System.currentTimeMillis() - start + "ms");
}
}