
https://www.acmicpc.net/problem/10610 10610번: 30 문제 어느 날, 미르코는 우연히 길거리에서 양수 N을 보았다. 미르코는 30이란 수를 존경하기 때문에, 그는 길거리에서 찾은 수에 포함된 숫자들을 섞어 30의 배수가 되는 가장 큰 수를 만들고 싶� www.acmicpc.net [소스 코드] n = list(input()) # 양수 N n.sort(reverse=True) # 큰 수를 출력해야하므로 오름차순으로 정렬 answer = -1 # 30의 배수가 아니라면 -1을 출력 if '0' in n: # 10의 배수이고 numbers = sum(map(int, n)) # 각 자리의 숫자 합이 if numbers % 3 == 0: # 3의 배수라면 answer = ''.j..

https://www.acmicpc.net/problem/2828 2828번: 사과 담기 게임 문제 상근이는 오락실에서 바구니를 옮기는 오래된 게임을 한다. 스크린은 N칸으로 나누어져 있다. 스크린의 아래쪽에는 M칸을 차지하는 바구니가 있다. (M 입력 첫째 줄에 N과 M이 주어진다. (1 �� www.acmicpc.net [소스 코드] n, m = map(int, input().split()) # 스크린 크기, 바구니 크기 j = int(input()) # 사과의 개수 apples = [int(input()) for _ in range(j)] # 사과의 위치를 담은 리스트 size = m - 1 # 바구니 크기 [왼쪽 제외] left = 1 # 바구니 왼쪽 끝의 위치 right = left + size..

https://www.acmicpc.net/problem/3486 3486번: Adding Reversed Numbers The Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure some tragedies into comedies. Obviously, this work is very hard beca www.acmicpc.net [소스 코드] n = int(input()) # 테스트 케이스 수 for i in range(n): f..

https://www.acmicpc.net/problem/2875 2875번: 대회 or 인턴 문제 백준대학교에서는 대회에 나갈 때 2명의 여학생과 1명의 남학생이 팀을 결성해서 나가는 것이 원칙이다. (왜인지는 총장님께 여쭈어보는 것이 좋겠다.) 백준대학교는 뛰어난 인재들이 많아 www.acmicpc.net [소스 코드] n, m, k = map(int, input().split()) # 여학생 수, 남학생 수, 인턴쉽에 참여해야하는 인원 group = min(n // 2, m) # 그룹을 만들 수 있는 수 remain = n - group * 2 + m - group # 그룹을 만들고 남은 인원 수 if remain < k: # 남은 인원 수가 필요 인원보다 적을 경우 group -= (k - rem..

Kotlin(native / JVM)으로 풀어보기 11654 아스키 코드 (native) fun main() { println(readLine()!!.single().toInt()) } 11720 숫자의 합 (native) fun main() { val count = readLine()!!.toInt() println(readLine()!!.chunked(1).subList(0, count).map { it.toInt() }.sum()) } 10809 알파벳 찾기 (JVM) fun main() { readLine()!!.apply { for (key in 'a'..'z') { print("${this.indexOf(key)} ") } } } 2675 문자열 반복 (native) fun main() { r..

Kotlin(native / JVM)으로 풀어보기 4673 셀프 넘버 (native) fun constructor(number: Int): Int { return number + sumOfNumbers(number) } fun sumOfNumbers(number: Int): Int { var digit = number var sum = 0 while (digit != 0) { sum += (digit % 10) digit /= 10 } return sum } fun main() { val list = linkedSetOf() for (i in 1..10000) { list.add(i) } for (i in 1..10000) { list.remove(constructor(i)) } list.forEach ..

Kotlin(native / JVM)으로 풀어보기 10818 최소, 최대 (JVM) import java.io.BufferedReader import java.io.BufferedWriter import java.io.InputStreamReader import java.io.OutputStreamWriter fun main() { val bufferedReader = BufferedReader(InputStreamReader(System.`in`)) val bufferedWriter = BufferedWriter(OutputStreamWriter(System.out)) val count = bufferedReader.readLine().toInt() val array = bufferedReader.re..

Kotlin(native / JVM)으로 풀어보기 10952 A + B - 5 (native) fun main() { while (true) { val (a, b) = readLine()!!.split(' ').map { it.toInt() } if (a == 0 && b == 0) break println("${a + b}") } } 10952 A + B - 4 (JVM) import java.util.* fun main() { Scanner(System.`in`).apply { while (this.hasNextInt()) { println(this.nextLine().split(' ').map { it.toInt() }.sum()) } } } 1110 더하기 사이클 (native) fun main(..

Kotlin(native / JVM)으로 풀어보기 2739 구구단 (native) fun main() { val target = readLine()?.toInt() ?: 0 for (i in 1 until 10) { println("$target * $i = ${target * i}") } } 10950 A + B - 3 (native) fun readInt() = readLine()!!.split(' ').map { it.toInt() } fun main() { val count = readLine()?.toInt() ?: 0 for (i in 1..count) { println("${readInt().sum()}") } } 8393 합 (native) fun main() { val n = readLi..
- Total
- Today
- Yesterday
- programmers
- 2020 카카오 인턴십
- 정렬
- bfs
- dfs
- BOJ
- 이것이 코딩테스트다
- DP
- Idempotent
- 그래프
- OS
- repository
- 열혈강의
- 알고리즘
- 코틀린
- 2019 카카오 개발자 겨울 인턴십
- git
- Algorihtm
- 구현
- 단계별로 문제풀이
- binary search
- Python
- Algorithm
- 백준
- 깃
- 그리디
- 저장소
- 자료구조
- Summer/Winter Coding(~2018)
- spring boot 2.3.1
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |