From 388ad7d3a1be1f4027c3544e0ffaf32479adb152 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Fri, 24 Apr 2026 19:50:18 +0900 Subject: [PATCH] baekjoon 20260424 --- code_study/Baekjoon/python/16486.py | 1 + code_study/Baekjoon/swift/2098.swift | 40 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 code_study/Baekjoon/python/16486.py create mode 100644 code_study/Baekjoon/swift/2098.swift diff --git a/code_study/Baekjoon/python/16486.py b/code_study/Baekjoon/python/16486.py new file mode 100644 index 0000000..ef3e0d6 --- /dev/null +++ b/code_study/Baekjoon/python/16486.py @@ -0,0 +1 @@ +print((lambda a, b : 2*(a + b*3.141592))(int(input()), int(input()))) \ No newline at end of file diff --git a/code_study/Baekjoon/swift/2098.swift b/code_study/Baekjoon/swift/2098.swift new file mode 100644 index 0000000..6b5cf92 --- /dev/null +++ b/code_study/Baekjoon/swift/2098.swift @@ -0,0 +1,40 @@ +func main() -> Int { + guard let N = Int(readLine() ?? "") else { return -1 } + + var W: [[Int]] = [] + for _ in 0.. Int { + if visit == (1 << N - 1) { + if W[curr][0] == 0 { + return INF + } + return W[curr][0] + } + + if dp[curr][visit] == -1 { + dp[curr][visit] = INF + + for nxt in 0..