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()