3 lines
101 B
Java
3 lines
101 B
Java
public static boolean prime(int n) {
|
|
return !new String(new char[n]).matches(".?|(..+?)\\1+");
|
|
}
|