From d3c56c0194153c624511f082351703b230a0d287 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Thu, 1 Jan 2026 21:35:43 +0900 Subject: [PATCH] baekjoon 20260101 --- code_study/Baekjoon/c/10039.c | 13 +++++++++++ code_study/Baekjoon/swift/2473.swift | 34 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 code_study/Baekjoon/c/10039.c create mode 100644 code_study/Baekjoon/swift/2473.swift diff --git a/code_study/Baekjoon/c/10039.c b/code_study/Baekjoon/c/10039.c new file mode 100644 index 0000000..ee373eb --- /dev/null +++ b/code_study/Baekjoon/c/10039.c @@ -0,0 +1,13 @@ +#include + +int main() { + int ans = 0; + for(int i=0; i<5; i++) { + int n; + scanf("%d",&n); + if(n < 40) n = 40; + ans += n/5; + } + printf("%d\n",ans); + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/swift/2473.swift b/code_study/Baekjoon/swift/2473.swift new file mode 100644 index 0000000..c204ae1 --- /dev/null +++ b/code_study/Baekjoon/swift/2473.swift @@ -0,0 +1,34 @@ +func solve() { + guard let N = Int(readLine() ?? ""), + let input = readLine() + else { return } + + var val: [Int] = input.split(separator: " ").compactMap{Int($0)} + val.sort(by: <) + var minAbs = Int.max + var ans: [Int] = [0, 0, 0] + + for fix in 0.. 0 { + R -= 1 + } + else { + L += 1 + } + } + } + + print(ans.compactMap({String($0)}).joined(separator: " ")) +} + +solve()