Home
ChaenLog
Cancel

SwiftUI 공식 문서 - Model data

아카데미에서의 MC1, MC2 기간 동안 만나본 property wrapper들을 알아보기위해 공식 문서 살펴보기 SwiftUI 공식 문서 - Model data Creating and sharing view state @State A property wrapper type that can read and write a value manag...

스터디 1주차 내용 정리(수정중)

수정중 ❗바킹독님의 실전 알고리즘 강의를 듣고 정리하는 포스팅입니다. 강의-블로그 1주차 내용 정리 배열 : 메모리 상에 원소를 연속하게 배치한 자료구조 Python 활용 파이썬에서는 리스트가 배열 기능 제공 파이썬의 리스트는 서로 다른 자료형을 원소로 가질 수 있음 동적 배열로써 자유롭게 크기 확장 가능 arr = [1,...

[1일 1문제] 3월 23일 문제풀이

✏️백준 1439번 : 뒤집기 문제 나의 풀이 - Swift let s = readLine()! var temp1 = s.split(separator: "0").map{ String($0) } var temp2 = s.split(separator: "1").map{ String($0) } print(min(temp1.count, temp2.cou...

[1일 1문제] 3월 22일 문제풀이

✏️백준 1259번 :팰린드롬수 문제 나의 풀이 - Swift while true { let n = readLine()! if n == "0" { break } if n == String(n.reversed()) { print("yes") } else { print("no...

[1일 1문제] 3월 21일 문제풀이

✏️백준 1085번 : 나머지 문제 나의 풀이 - Swift let input = readLine()!.split(separator: " ").map{ Int(String($0))! } let x = input[0]; let y = input[1]; let w = input[2]; let h = input[3] let temp = [w-x, x, ...

[1일 1문제] 3월 20일 문제풀이

✏️백준 1929번 : 소수 구하기 문제 나의 풀이 - Swift let mn = readLine()!.split(separator: " ").map{ Int(String($0))!} let m = mn[0] let n = mn[1] var nums = Array(repeating: true, count: n + 1) nums[0] = false ...

[1일 1문제] 3월 17일 문제풀이

✏️백준 2609번 : 최대공약수와 최소공배수 문제 나의 풀이 - Swift func gcd(_ x: Int, _ y: Int) -> Int { var a = x var b = y while b != 0 { let r = a % b a = b b = r } retur...

[1일 1문제] 3월 16일 문제풀이

✏️백준 17427번 : 약수의 합2 문제 나의 풀이 - Swift let n = Int(readLine()!)! var temp: [Int] = [] for i in (1...n+1) { temp.append(i * (n / i)) } print(temp.reduce(0, +)) - Python import sys input = s...

[1일 1문제] 3월 15일 문제풀이

✏️백준 1037번 : 약수 문제 나의 풀이 - Swift let count = Int(readLine()!)! var divisors = readLine()!.split(separator: " ").map{ Int(String($0))! } divisors.sort() print(divisors[0] * divisors[count-1]) ...

[1일 1문제] 3월 14일 문제풀이

✏️백준 10430번 : 나머지 문제 나의 풀이 - Swift let nums = readLine()!.split(separator: " ").map{ Int(String($0))! } let a = nums[0] let b = nums[1] let c = nums[2] print((a+b) % c) print(((a%c) + (b%c)) % c...