개발자겨려

  • 홈
  • 태그
  • 방명록

Algorithm 1

[프로그래머스] [PCCE 기출문제] 2번 / 출력 (java)

문제 풀이 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(대상숫자,지수)를 넣어주면 된다

Algorithm🧠/Programmers 2024.05.06
이전
1
다음
더보기
프로필사진

개발자겨려

개인 공부 블로그

  • 분류 전체보기
    • Algorithm🧠
      • Programmers
      • LeetCode
      • BaekJoon
    • Containerization
      • Docker🐳
    • Framework
      • Spring🌱
    • General
      • Java☕️
      • JavaScript
      • JPA
      • Git🐙
      • jQuery
      • Servlet과 JSP
      • React⚛️
    • Project
      • profile-service
      • library
    • DataBase🛢
      • query🔍
      • LeetCode 문제 풀이
      • H2

Tag

RequiredArgsConstructor, programmers, Spring, @RequiredArgsConstructor, tomcat, Algorithm, Spring #Springboot #스프링부트 #Java, baekjoon #algorithm #java, Servlet #JSP, git #sourcetree #적합한 작업중인 복사본 경로가 아닙니다, java #, Spring #Springboot #스프링부트 #java.lang.IllegalArgumentException: Name for argument of type [java.lang.String] not specified,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • 알짜배기 프로그래머

티스토리툴바