diff --git a/code_study/Baekjoon/c/14489.c b/code_study/Baekjoon/c/14489.c new file mode 100644 index 0000000..e012467 --- /dev/null +++ b/code_study/Baekjoon/c/14489.c @@ -0,0 +1,11 @@ +#include + +int a,b,c; + +int main() { + scanf("%d %d %d",&a, &b, &c); + + printf("%d\n",(a+b >= 2*c) ? (a+b)-2*c : a+b); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/swift/16946.swift b/code_study/Baekjoon/swift/16946.swift new file mode 100644 index 0000000..bba3088 --- /dev/null +++ b/code_study/Baekjoon/swift/16946.swift @@ -0,0 +1,98 @@ +func solve() { + guard let input1 = readLine() else { return } + let NM = input1.split(separator: " ").compactMap{Int($0)} + guard NM.count == 2 else { return } + let N = NM[0], M = NM[1] + + var field: [[Int]] = [] + for i in 0..