Home
ChaenLog
Cancel

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

✏️백준 10871번 : X보다 작은 수 문제 나의 풀이 let nx = readLine()!.split(separator: " ").map{ Int(String($0))! } let nums = readLine()!.split(separator: " ").map{ Int(String($0))! } for n in nums { if n &l...

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

백준 1330번 : 두 수 비교하기 문제 나의 풀이 if let input = readLine() { let nums = input.split(separator: " ").map{ Int(String($0))! } if nums[0] > nums[1] { print(">") } else if n...

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

✏️백준 11382번 : 꼬마 정민 문제 나의 풀이 if let input = readLine() { let nums = input.split(separator: " ").map{ Int(String($0))! } print(nums.reduce(0, +)) } 수정중 공식문서 살펴보기📚 고차함수(Higher-order Fu...

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

✏️백준 1000번 : A+B 문제 나의 풀이 import Foundation // 1번 풀이 - components 이용 if let input = readLine() { let nums = input.components(separatedBy: " ") print(Int(nums[0])! + Int(nums[1])!) } ...

아카데미 일상 1주차

아카데미에서의 일상을 기록합니다 Apple Develpoer Acadmy @ POSTECH 1주차 개강 전 주말 포스텍 생활관에 입소했다. 숙소가 너무너무 더러워서 충격이었지만 타지에서 저렴한 가격으로 살 수 있다는 것만으로 만족하기로 했다. 일요일엔 여성러너분들을 모아 함께 식사를 했다. 오랜만에 많은 사람들을 만나서 즐거웠다. 월요일 엄청난...

[Swift] 프로그래머스 Lv.0 문제 - 3

수정중 ❤️‍🔥 프로그래머스 Lv. 0 문제로 Swift와 친해지기! import Foundation 생략 공 던지기 func solution(_ numbers:[Int], _ k:Int) -> Int { var temp = 2 * k - 1 var n = numbers.count return temp ...

[Swift] 프로그래머스 Lv.0 문제 - 2

❤️‍🔥 프로그래머스 Lv. 0 문제로 Swift와 친해지기! import Foundation 생략 나이 출력 func solution(_ age:Int) -> Int { return 2023 - age } 배열 뒤집기 func solution(_ num_list:[Int]) -> [Int] { return nu...

[Swift] 프로그래머스 Lv.0 문제 - 1

❤️‍🔥 프로그래머스 Lv. 0 문제로 Swift와 친해지기! 코딩테스트 입문 100제를 푸는 포스팅입니다. 20문제씩 총 5개의 게시글이 올라갈 예정입니다. import Foundation 생략 중복된 숫자 개수 // where절 사용 func solution(_ array:[Int], _ n:Int) -> Int { var...