From 13a9d2ee86e2d6d5396737b7cb269966cad48f7b Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Sat, 13 Sep 2025 20:47:03 +0900 Subject: [PATCH] 20250913 baekjoon --- code_study/Baekjoon/python/19944.py | 2 ++ code_study/Baekjoon/python/23027.py | 18 ++++++++++++++++++ code_study/Baekjoon/python/3733.py | 7 +++++++ code_study/Baekjoon/python/4696.py | 7 +++++++ code_study/Baekjoon/python/8370.py | 2 ++ code_study/Baekjoon/ts/2154.ts | 5 +++++ code_study/Baekjoon/ts/27880.ts | 8 ++++++++ code_study/Baekjoon/ts/31090.ts | 3 +++ 8 files changed, 52 insertions(+) create mode 100644 code_study/Baekjoon/python/19944.py create mode 100644 code_study/Baekjoon/python/23027.py create mode 100644 code_study/Baekjoon/python/3733.py create mode 100644 code_study/Baekjoon/python/4696.py create mode 100644 code_study/Baekjoon/python/8370.py create mode 100644 code_study/Baekjoon/ts/2154.ts create mode 100644 code_study/Baekjoon/ts/27880.ts create mode 100644 code_study/Baekjoon/ts/31090.ts diff --git a/code_study/Baekjoon/python/19944.py b/code_study/Baekjoon/python/19944.py new file mode 100644 index 0000000..bc47481 --- /dev/null +++ b/code_study/Baekjoon/python/19944.py @@ -0,0 +1,2 @@ +N ,M = map(int, input().split()) +print("NEWBIE!" if M==1 or M==2 else "OLDBIE!" if M<=N else "TLE!") \ No newline at end of file diff --git a/code_study/Baekjoon/python/23027.py b/code_study/Baekjoon/python/23027.py new file mode 100644 index 0000000..376fff6 --- /dev/null +++ b/code_study/Baekjoon/python/23027.py @@ -0,0 +1,18 @@ +S = input() + +if 'A' in S : + S = S.replace('B', 'A') + S = S.replace('C', 'A') + S = S.replace('D', 'A') + S = S.replace('F', 'A') +elif 'B' in S : + S = S.replace('C', 'B') + S = S.replace('D', 'B') + S = S.replace('F', 'B') +elif 'C' in S : + S = S.replace('D', 'C') + S = S.replace('F', 'C') +else : + S = 'A'*len(S) + +print(S) \ No newline at end of file diff --git a/code_study/Baekjoon/python/3733.py b/code_study/Baekjoon/python/3733.py new file mode 100644 index 0000000..8a3a13d --- /dev/null +++ b/code_study/Baekjoon/python/3733.py @@ -0,0 +1,7 @@ +while True : + try : + n, s = map(int, input().split()) + except : + break + + print(s//(n+1)) \ No newline at end of file diff --git a/code_study/Baekjoon/python/4696.py b/code_study/Baekjoon/python/4696.py new file mode 100644 index 0000000..45d874a --- /dev/null +++ b/code_study/Baekjoon/python/4696.py @@ -0,0 +1,7 @@ +while True : + N = float(input()) + if N == 0 : + break + + res = 1 + N * (1 + N * (1 + N * (1 + N))) + print(f'{res:.2f}') \ No newline at end of file diff --git a/code_study/Baekjoon/python/8370.py b/code_study/Baekjoon/python/8370.py new file mode 100644 index 0000000..d7a5964 --- /dev/null +++ b/code_study/Baekjoon/python/8370.py @@ -0,0 +1,2 @@ +n1, k1, n2, k2 = map(int, input().split()) +print(n1*k1 + n2*k2) \ No newline at end of file diff --git a/code_study/Baekjoon/ts/2154.ts b/code_study/Baekjoon/ts/2154.ts new file mode 100644 index 0000000..66af4ea --- /dev/null +++ b/code_study/Baekjoon/ts/2154.ts @@ -0,0 +1,5 @@ +export {}; +const input: string = require("fs").readFileSync(0, "utf8").toString().trim(); +let str: string = ""; +for(let s=1; s<=Number(input); s++) str += s.toString(); +console.log(str.indexOf(input)+1); \ No newline at end of file diff --git a/code_study/Baekjoon/ts/27880.ts b/code_study/Baekjoon/ts/27880.ts new file mode 100644 index 0000000..e633cf6 --- /dev/null +++ b/code_study/Baekjoon/ts/27880.ts @@ -0,0 +1,8 @@ +export {}; +const input: string[] = require("fs").readFileSync(0, "utf8").toString().trim().split('\n'); +let depth: number = 0; +for(let line of input) { + const [method, num]: string[] = line.split(' '); + depth += (method === 'Es' ? Number(num)*21 : Number(num)*17); +} +console.log(depth); \ No newline at end of file diff --git a/code_study/Baekjoon/ts/31090.ts b/code_study/Baekjoon/ts/31090.ts new file mode 100644 index 0000000..31d06e8 --- /dev/null +++ b/code_study/Baekjoon/ts/31090.ts @@ -0,0 +1,3 @@ +export {}; +const input: number[] = require("fs").readFileSync(0, "utf8").toString().trim().split('\n').map(Number); +for(let n of input.slice(1)) console.log((n+1)%(n%100)===0 ? "Good" : "Bye"); \ No newline at end of file