Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- 시뮬레이션
Archives
- Today
- Total
목록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