#4012: 求救~ 高手幫幫忙~


elsonhao87 (暨大)


import java.util.Scanner;

public class Test123
{
    public static void main(String[] argv)
    {
        Scanner input = new Scanner(System.in);
        long a;    
        while(input.hasNext())
        {
            a = input.nextLong();
            if(a%2 != 0 && a >= 2)
                System.out.println("質數");
            else if(a%2 == 0)
                System.out.println("非質數");
        }
    }
}
 
不懂哪裡錯的~  
我再自己電腦測試有過了~