From 11b4b82914066b8a18f0e7129d1d40e94c455685 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Tue, 7 Apr 2026 21:01:20 +0900 Subject: [PATCH] baekjoon 20260407 --- code_study/Baekjoon/python/4493.py | 11 +++++++++ code_study/Baekjoon/swift/2533.swift | 34 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 code_study/Baekjoon/python/4493.py create mode 100644 code_study/Baekjoon/swift/2533.swift diff --git a/code_study/Baekjoon/python/4493.py b/code_study/Baekjoon/python/4493.py new file mode 100644 index 0000000..ecea055 --- /dev/null +++ b/code_study/Baekjoon/python/4493.py @@ -0,0 +1,11 @@ +res = [] +for _ in range(int(input())) : + a, b, t = 0, 0, int(input()) + for _ in range(t) : + line = input().rstrip() + if line == "R S" or line == "S P" or line == "P R" : + a += 1 + elif line == "S R" or line == "P S" or line == "R P" : + b += 1 + res.append("TIE" if a == b else "Player 1" if a > b else "Player 2") +print('\n'.join(res)) \ No newline at end of file diff --git a/code_study/Baekjoon/swift/2533.swift b/code_study/Baekjoon/swift/2533.swift new file mode 100644 index 0000000..a26151e --- /dev/null +++ b/code_study/Baekjoon/swift/2533.swift @@ -0,0 +1,34 @@ +func main() { + guard let N = Int(readLine() ?? "") else { return } + + var graph: [[Int]] = Array(repeating: [], count: N+1) + + for _ in 1..