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
- 코딩
- 알고리즘
- 클라우드
- Spring
- DP
- 자료구조
- 페이징
- PL/SQL
- feign
- aws
- 오라클
- Jenkins
- 데이터베이스
- MVC
- Kafka
- 디자인 패턴
- Spring Cloud Feign
- 자바
- Spring Cloud
- 백준
- retry
- SQL
- db
- MST
- Intellj
- Spring Boot
- 운영체제
- JPA
- golang
- 쿼리
Archives
- Today
- Total
justgo_developer
[JAVA] 백준 1057 토너먼트 본문
import java.util.*;
public class Main {
private static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int N = sc.nextInt();
int kim = sc.nextInt();
int lim = sc.nextInt();
int cnt = 0;
while(kim!=lim){
kim = kim/2 + kim%2;
lim = lim/2 + lim%2;
cnt++;
}
System.out.print(cnt);
}
}
'IT > 코딩 문제 풀이' 카테고리의 다른 글
| [JAVA] 백준 1012 유기농배추 (0) | 2018.01.10 |
|---|---|
| [JAVA]백준 2178 미로탐색 (0) | 2018.01.09 |
| [JAVA] 백준 2161 카드1 (0) | 2018.01.03 |
| [JAVA] 백준 1547 공 (0) | 2018.01.03 |
| [JAVA] 백준 2455번 지능형기차 (0) | 2018.01.01 |