본문 바로가기

슈콩

검색하기
슈콩
프로필사진 shukong

  • 분류 전체보기 (534)
    • Algorithms (454)
      • Baekjoon (235)
      • Programmers (88)
      • SWEA (129)
      • 이론 (2)
    • Diary (13)
      • Running Log (13)
    • Database (15)
      • SQL (15)
      • Oracle (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/01   »
일 월 화 수 목 금 토
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
Tags
  • 건강
  • 백준
  • 문제해결
  • 프로그래머스
  • oracle
  • 이분탐색
  • BOJ
  • DP
  • dfs
  • COS PRO
  • greedy
  • 문자열
  • SQL
  • BFS
  • 코테
  • math
  • Java
  • SWEA
  • 운동기록
  • 코딩테스트
  • MySQL
  • priorityqueue
  • db
  • 문제풀이
  • 러닝일지
  • 자바
  • 알고리즘
  • 투포인터
  • binary search
  • 시뮬레이션
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2026/01/02 (1)

슈콩

COS PRO 1급 JAVA 몇번 연산을 해야 하나요

[소스 코드]import java.util.*;class Main { public int solution(int number, int target) { int answer = 0; Queue q = new LinkedList(); boolean[] visit = new boolean[30000]; q.offer(new int[]{number,0}); visit[number] = true; while(!q.isEmpty()){ int[] curr = q.poll(); if(curr[0]==target){ answer = curr[1]; break; } else{ if(!visit[curr[0]+1]){ q.offer(new int[]{curr[0]+1,..

카테고리 없음 2026. 1. 2. 22:31
이전 Prev 1 Next 다음

Blog is powered by AXZ / Designed by Tistory

티스토리툴바