문제 풀이 public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int c = sc.nextInt(); //풀이 1 int b_square = (int) (Math.pow(c, 2) - Math.pow(a, 2)); //풀이 2 //int b_square = (c - a) * (c + a); System.out.println(b_square); } 해설Math.pow() 메소드는 입력값과 출력값은 모두 double형이며 Math.pow(대상숫자,지수)를 넣어주면 된다