소스범벅
close
프로필 배경
프로필 로고

소스범벅

  • All (81)
    • ✨ Programming (21)
      • Java (3)
      • Spring (8)
      • Architecture (1)
      • Tool (8)
      • 문제&버그 (1)
    • ✨ Algorithm (55)
      • 백준 (31)
      • 프로그래머스 (24)
      • 개념 (0)
    • ✨ CS (2)
      • 자료구조 (0)
      • 운영체제 (0)
      • 네트워크 (2)
      • 데이터베이스 (0)
    • ✨ 독서 (3)
  • 깃허브
  • 방명록
[알고리즘] 프로그래머스 120842번 2차원으로 만들기 (자바|Java)

[알고리즘] 프로그래머스 120842번 2차원으로 만들기 (자바|Java)

1. 문제 2. 풀이 class Solution { public int[][] solution(int[] num_list, int n) { int[][] answer = {}; answer = new int[num_list.length / n][n]; int index = 0; for(int i = 0; i < num_list.length / n; i++) { for(int j = 0; j < n; j++) { answer[i][j] = num_list[index]; index++; } } return answer; } }

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 4. 3.
  • textsms
[알고리즘] 프로그래머스 120902번 문자열 계산하기 (자바|Java)

[알고리즘] 프로그래머스 120902번 문자열 계산하기 (자바|Java)

1. 문제 2. 풀이 class Solution { public int solution(String my_string) { int answer = 0; String[] arr = my_string.split(" "); answer = Integer.valueOf(arr[0]); for(int i = 1; i < arr.length; i += 2) { if(arr[i].equals("+")) { answer += Integer.valueOf(arr[i + 1]); } else if(arr[i].equals("-")) { answer -= Integer.valueOf(arr[i + 1]); } } return answer; } }

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 4. 1.
  • textsms
[알고리즘] 프로그래머스 120884번 치킨 쿠폰 (자바|Java)

[알고리즘] 프로그래머스 120884번 치킨 쿠폰 (자바|Java)

1. 문제 2. 풀이 class Solution { public int solution(int chicken) { int answer = -1; answer = 0; int coupon = chicken; while(coupon >= 10) { answer += coupon / 10; coupon = coupon / 10 + coupon % 10; } return answer; } }

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 3. 30.
  • textsms
[알고리즘] 프로그래머스 120848번 팩토리얼 (자바|Java)

[알고리즘] 프로그래머스 120848번 팩토리얼 (자바|Java)

1. 문제 2. 풀이 class Solution { public int solution(int n) { int answer = 0; for(int i = 1; i = 1; j--) { factorial *= j; } if(factorial

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 3. 29.
  • textsms
[알고리즘] 프로그래머스 120885번 이진수 더하기 (자바|Java)

[알고리즘] 프로그래머스 120885번 이진수 더하기 (자바|Java)

1. 문제 2. 풀이 class Solution { public String solution(String bin1, String bin2) { String answer = ""; answer = String.valueOf(Integer.toBinaryString(Integer.parseInt(bin1, 2) + Integer.parseInt(bin2, 2))); return answer; } } 3. 참고 https://hianna.tistory.com/527 [Java] 10진수 2진수, 8진수, 16진수로 변환하기 10진수 -> 2진수, 8진수, 16진수로 변환하기 java.lang.Integer의 toBinaryString(), toOctalString(), toHexaString() 메소드를 이용..

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 3. 28.
  • textsms
[알고리즘] 프로그래머스 120912번 7의 개수 (자바|Java)

[알고리즘] 프로그래머스 120912번 7의 개수 (자바|Java)

1. 문제 2. 풀이 import java.util.Arrays; class Solution { public int solution(int[] array) { int answer = 0; String str = Arrays.stream(array) .mapToObj(String::valueOf) .reduce((x, y) -> x + ", " + y) .get(); String[] strArr = str.split(""); for(int i = 0; i < strArr.length; i++) { if(strArr[i].equals("7")) { answer++; } } return answer; } }

  • format_list_bulleted ✨ Algorithm/프로그래머스
  • · 2023. 3. 28.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • ···
  • 10
  • navigate_next
전체 카테고리
  • All (81)
    • ✨ Programming (21)
      • Java (3)
      • Spring (8)
      • Architecture (1)
      • Tool (8)
      • 문제&버그 (1)
    • ✨ Algorithm (55)
      • 백준 (31)
      • 프로그래머스 (24)
      • 개념 (0)
    • ✨ CS (2)
      • 자료구조 (0)
      • 운영체제 (0)
      • 네트워크 (2)
      • 데이터베이스 (0)
    • ✨ 독서 (3)
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바