반응형
fun main(args: Array<String>) {
val input = readLine()!!.split(' ')
val s1 = input[0]
val a = input[1]!!.toInt()
for(i in 0 until a){
print(s1)
}
}
https://postiveemblem.tistory.com/164
[Kotlin][5]코틀린 readline()과 자료형 변환 방법
안녕하세요. 오늘은 저번 타이머 함수 사용법에 이어서 readline()을 이용해 사용자에게 입력받는 법을 알아보려고 합니다. 또 입력 받은 모든 값을 스트링 값으로 반환하는 readline()을 어떻게 하면
postiveemblem.tistory.com
반응형
'IT > 알고리즘' 카테고리의 다른 글
82 프로그래머스] kotlin 각도기 (0) | 2023.10.10 |
---|---|
81 프로그머스] Kotlin 대소문자 바꿔서 출력하기 (0) | 2023.10.08 |
79] 프로그래머스 a와 b 출력하기 kotlin (0) | 2023.10.05 |
78] 1672. Richest Customer Wealth Kotlin (0) | 2023.04.19 |
77] Leetcode 1979. Find Greatest Common Divisor of Array #Kotlin (0) | 2023.04.12 |
댓글