개발자겨려

  • 홈
  • 태그
  • 방명록

Algorithm🧠/Programmers 2

[프로그래머스] [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

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

풀이public class Solution { public static void main(String[] args) { String msg = "Spring is beginning"; int val1 = msg.split(" ").length; String val2 = String.valueOf(val1); System.out.println(msg); System.out.println(val1 + 10); System.out.println(val2 + "10"); }}

Algorithm🧠/Programmers 2024.04.12
이전
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

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

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
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.

  • 알짜배기 프로그래머

티스토리툴바