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
- didset
- willset
- IOS
- 생명주기
- 코딩테스트
- SwiftUI
- 프로그래머스
- @Binding
- lifecycle
- inout
- 짝수의합
- 문자열 반복
- 야곰아카데미
- @State
- 랜덤추출
- App구조
- navigationcontroller
- Swift
- LV0
- @main
- Property Observer
- dismiss
- propertWrappers
- swift grammer
- 공식문서
- 대소문자바꾸기
- Stride
- Swift문법
- randomElement
- Swift 문법
Archives
- Today
- Total
목록문자열 반복 (1)
miniworld
[Swift] 프로그래머스 Lv0. 문자 반복 출력하기
문자열 반복해서 출력하기 for문을 이용 import Foundation let inp = readLine()!.components(separatedBy: [" "]).map { $0 } let (s1, a) = (inp[0], Int(inp[1])!) for _ in 1...a { print(s1, terminator: "") } 출력 결과 입력값 〉"string 5" 출력값 〉"stringstringstringstringstring" repeating 이용 import Foundation let inp = readLine()!.components(separatedBy: [" "]).map { $0 } let (s1, a) = (inp[0], Int(inp[1])!) print(String(repeat..
Swift/프로그래머스 코딩테스트 연습
2023. 7. 10. 22:07