| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 사파리 월드
- safari world
- 개수 세기
- 10926
- 기본메신저
- Counting The number
- 백준
- 1330
- 백준3085
- 디버그심볼
- kotlin
- PreferenceManager
- 10430
- 18108
- 브루트포스
- 꼬마 정민
- 2525
- 파이썬
- 백준1107
- 25083
- Android
- dp
- 코틀린
- Class Delegation
- 새싹
- baekjoon
- debugSymbolLevel
- BitMasking
- 백준1476
- 10807
- Today
- Total
목록kotlin (7)
세상을 더 좋게
https://www.acmicpc.net/problem/10807 10807번: 개수 세기 첫째 줄에 정수의 개수 N(1 ≤ N ≤ 100)이 주어진다. 둘째 줄에는 정수가 공백으로 구분되어져있다. 셋째 줄에는 찾으려고 하는 정수 v가 주어진다. 입력으로 주어지는 정수와 v는 -100보다 크거 www.acmicpc.net You have to use count() function block. And you will get simple code, concise code. fun main() { val numberCount = readln().toInt() val numberArray = readln().split(" ") val findNumber = readln().toInt() val collectN..
https://www.acmicpc.net/problem/2420 2420번: 사파리월드 첫째 줄에 두 도메인의 유명도 N과 M이 주어진다. (-2,000,000,000 ≤ N, M ≤ 2,000,000,000) www.acmicpc.net fun main() { val input = readLine()!!.split(" ") val N = input[0].toLong() val M = input[1].toLong() val result = Math.abs(N - M) println(result) } Do you know get absolute value with kotlin? If you get it, this problem is very simple. But be careful to number ty..
https://www.acmicpc.net/problem/11382 11382번: 꼬마 정민 첫 번째 줄에 A, B, C (1 ≤ A, B, C ≤ 1012)이 공백을 사이에 두고 주어진다. www.acmicpc.net We need to concept in overflow to resolve this problem. The number received restricted in 10^15. So we do not use 'Int' but 'Long' type. OVerflow occurs when there are insufficient bits in a binary number representation to portray the result of an arithmetic operation. fun m..
https://www.acmicpc.net/problem/25083 25083번: 새싹 아래 예제와 같이 새싹을 출력하시오. www.acmicpc.net Double quotation marks is good answer in this problem. because double qutation marks used in situation to express raw text. fun main() { println(""" ,r'"7 r`-_ ,' ,/ \. ". L_r' `~\/ | |""") }
https://www.acmicpc.net/problem/10699 10699번: 오늘 날짜 서울의 오늘 날짜를 출력하는 프로그램을 작성하시오. www.acmicpc.net I will solve alogorythme problem in 'solved.ac'. Because that website is interesting me. Rating system, problem categorization. The rating system proveded a gaming-like experience, reminiscent of playing the globally renowned game 'LOL', making solving problems feel like playing a game. Kotlin import..
간단한 코드를 일단 보자 interface Base { fun printX() } class BaseImpl(val x: Int) : Base { override fun printX() { print(x) } } interface를 통해 클래스에 필요한 프로토타입을 만들어 놓고 이를 BaseImpl이라는 클래스가 받아서 printX()를 제대로 구현하고 있다. interface Base { fun printX() } class BaseImpl(val x: Int) : Base { override fun printX() { print(x) } } class Derived(baseImpl: Base) 그렇다면 위와 같이 클래스 Derived가 BaseImpl의 구현된 메소드를 사용하려면 어떻게 해야할까? 인..
인터페이스는 클래스를 통해 구현된다. Example1. Runtime polymorphism 구현하기 open class Instrument { open fun play() { println("Instrument.play()") } } class Wind : Instrument() { override fun play() { println("Wind.play()") } } class Stringed : Instrument() { override fun play() { println("Stringed.play()") } } class Percussion : Instrument() { override fun play() { println("Percussion.play()") } } fun main() { v..