코딩테스트/lv0

[프로그래머스 코딩테스트] java Lv.0 피타고라스 정리 (PCCE 기출 문제 2번)

chantleman 2024. 6. 26. 14:50

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);
    }
}