public class Main { public static BufferedReader READER = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { int N = Integer.parseInt(READER.readLine()); int[] array = new int[N]; for(int i = 0; i < array.length; ++i) array[i] = Integer.parseInt(READER.readLine()); System.out.println("Negative: " + Main.function(array)); } public static boolean function(int[] array) { for(int number : array) if(number >= 0) return false; return true; } }
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static BufferedReader READER = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] args) throws IOException {
int N = Integer.parseInt(READER.readLine());
int[] array = new int[N];
for(int i = 0; i < array.length; ++i)
array[i] = Integer.parseInt(READER.readLine());
System.out.println("Negative: " + Main.function(array));
}
public static boolean function(int[] array) {
for(int number : array)
if(number >= 0) return false;
return true;
}
}