- Code
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int c = sc.nextInt();
int b_square = c * c - a * a;
System.out.println(b_square);
}
}
'Beakjoon&프로그래머스 > Java' 카테고리의 다른 글
[프로그래머스/Java] [PCCE 기출문제] 1번 / 출력 (0) | 2025.02.22 |
---|---|
[프로그래머스/Java] [PCCE 기출문제] 3번 / 나이 계산 (0) | 2025.02.22 |
[프로그래머스/Java] [PCCE 기출문제] 4번 / 병과분류 (0) | 2025.02.22 |
[프로그래머스/Java] [PCCE 기출문제] 4번 / 저축 (0) | 2025.02.22 |
[프로그래머스/Java] [PCCE 기출문제] 5번 / 산책 (0) | 2025.02.22 |