水题,逻辑清晰的都是水题
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sr=new Scanner(System.in);
while(sr.hasNext()) {
int n = sr.nextInt();
if(n == 0){
continue;
}
int zero = 0;
int posnumber = 0;
int negnumber = 0;
for(int i = 0; i < n; i++){
double num = sr.nextDouble();
if(num > 0.0){
posnumber++;
}else if(num == 0){
zero++;
}else{
negnumber++;
}
}
System.out.println(negnumber + " " + zero + " " + posnumber);
}
}
}