inblog logo
|
sxias
    Programmers_CT

    [Programmers_CT] 10. 피타고라스의 정리

    문정준's avatar
    문정준
    Feb 05, 2025
    [Programmers_CT] 10. 피타고라스의 정리
    Contents
    1. 문제 설명 - 디버깅제한 사항2. 입출력 예시3. 코드 수정4. 테스트 실행5. 제출 후 채점
    💡
    프로그래머스 코딩 테스트 10. 피타고라스의 정리

    1. 문제 설명 - 디버깅

    notion image
     

    제한 사항

    notion image

    2. 입출력 예시

    notion image
    notion image

    3. 코드 수정

    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); } }
    • 빗변의 제곱 - 한 변의 제곱 = 나머지 변의 제곱
      • b_square = c*c - a*a;
     

    4. 테스트 실행

    notion image

    5. 제출 후 채점

    notion image
     
    Share article
    Contents
    1. 문제 설명 - 디버깅제한 사항2. 입출력 예시3. 코드 수정4. 테스트 실행5. 제출 후 채점

    Sxias ㆍ a32176740@gmail.com

    RSS·Powered by Inblog