d063: 0 與 1
題目:http://zerojudge.tw/ShowProblem?problemid=d063
程式碼:
程式碼:
import java.util.Scanner;
public class d063 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();//輸入0 or 1
System.out.println(Math.abs(n-1));
}
}
}

留言
張貼留言