From 76a60e502f36daeb30a40d1087406de689e7fcc4 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Sat, 21 Jun 2025 20:48:22 +0900 Subject: [PATCH] 20250621 baekjoon --- code_study/Baekjoon/c/10250.c | 17 +++++++++++++++++ code_study/Baekjoon/c/2475.c | 12 ++++++++++++ code_study/Baekjoon/c/2741.c | 10 ++++++++++ code_study/Baekjoon/c/31403.c | 16 ++++++++++++++++ code_study/Baekjoon/js/10250.js | 7 +++++++ code_study/Baekjoon/js/2475.js | 3 +++ code_study/Baekjoon/js/2741.js | 4 ++++ code_study/Baekjoon/js/31403.js | 3 +++ code_study/Baekjoon/python/10250.py | 5 +++++ code_study/Baekjoon/python/2475.py | 2 ++ code_study/Baekjoon/python/2741.py | 2 ++ code_study/Baekjoon/python/31403.py | 3 +++ 12 files changed, 84 insertions(+) create mode 100644 code_study/Baekjoon/c/10250.c create mode 100644 code_study/Baekjoon/c/2475.c create mode 100644 code_study/Baekjoon/c/2741.c create mode 100644 code_study/Baekjoon/c/31403.c create mode 100644 code_study/Baekjoon/js/10250.js create mode 100644 code_study/Baekjoon/js/2475.js create mode 100644 code_study/Baekjoon/js/2741.js create mode 100644 code_study/Baekjoon/js/31403.js create mode 100644 code_study/Baekjoon/python/10250.py create mode 100644 code_study/Baekjoon/python/2475.py create mode 100644 code_study/Baekjoon/python/2741.py create mode 100644 code_study/Baekjoon/python/31403.py diff --git a/code_study/Baekjoon/c/10250.c b/code_study/Baekjoon/c/10250.c new file mode 100644 index 0000000..caaf8aa --- /dev/null +++ b/code_study/Baekjoon/c/10250.c @@ -0,0 +1,17 @@ +#include + +int main() { + int T; + scanf("%d",&T); + while(T--) { + int H, W, N, floor, number, isMulti; + scanf("%d %d %d",&H, &W, &N); + isMulti = N%H; + floor = isMulti ? N%H : H; + number = isMulti ? N/H + 1 : N/H; + if(number<10) printf("%d0%d\n",floor,number); + else printf("%d%d\n",floor,number); + } + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/2475.c b/code_study/Baekjoon/c/2475.c new file mode 100644 index 0000000..219cf20 --- /dev/null +++ b/code_study/Baekjoon/c/2475.c @@ -0,0 +1,12 @@ +#include + +int main() { + int n, sum=0; + for(int i=0; i<5; i++) { + scanf("%d",&n); + sum +=n*n; + } + printf("%d\n",sum%10); + + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/2741.c b/code_study/Baekjoon/c/2741.c new file mode 100644 index 0000000..8b0b5bf --- /dev/null +++ b/code_study/Baekjoon/c/2741.c @@ -0,0 +1,10 @@ +#include + +int main() { + int N; + scanf("%d",&N); + for(int n=1; n<=N; n++) { + printf("%d\n",n); + } + return 0; +} \ No newline at end of file diff --git a/code_study/Baekjoon/c/31403.c b/code_study/Baekjoon/c/31403.c new file mode 100644 index 0000000..d433577 --- /dev/null +++ b/code_study/Baekjoon/c/31403.c @@ -0,0 +1,16 @@ +#include + +int main() { + int A,B,C; + scanf("%d %d %d",&A, &B, &C); + int a=A, b=B; + while(b!=0) { + b /= 10; + a *= 10; + } + + printf("%d\n%d\n",A+B-C, a+B-C); + + return 0; + +} \ No newline at end of file diff --git a/code_study/Baekjoon/js/10250.js b/code_study/Baekjoon/js/10250.js new file mode 100644 index 0000000..d82b9db --- /dev/null +++ b/code_study/Baekjoon/js/10250.js @@ -0,0 +1,7 @@ +const n = require("fs").readFileSync(0,"utf8").toString().trim().split('\n'); +for(let i=1; i<=Number(n[0]); i++) { + let [H, W, N] = n[i].split(' ').map(Number); + const floor = N%H==0 ? H : N%H; + const number = N%H==0 ? Math.floor(N/H) : Math.floor(N/H) + 1; + console.log(`${floor}${number<10 ? '0' : ''}${number}`); +} \ No newline at end of file diff --git a/code_study/Baekjoon/js/2475.js b/code_study/Baekjoon/js/2475.js new file mode 100644 index 0000000..37936de --- /dev/null +++ b/code_study/Baekjoon/js/2475.js @@ -0,0 +1,3 @@ +const n = require("fs").readFileSync(0, "utf8").toString().trim().split(' ').map(Number); +const res = n.reduce((acc,v) => acc + v**2,0)%10; +console.log(res); \ No newline at end of file diff --git a/code_study/Baekjoon/js/2741.js b/code_study/Baekjoon/js/2741.js new file mode 100644 index 0000000..936ca67 --- /dev/null +++ b/code_study/Baekjoon/js/2741.js @@ -0,0 +1,4 @@ +const N = Number(require("fs").readFileSync(0,"utf8").toString().trim()); +for(let n=1; n<=N; n++) { + console.log(n); +} \ No newline at end of file diff --git a/code_study/Baekjoon/js/31403.js b/code_study/Baekjoon/js/31403.js new file mode 100644 index 0000000..e1b9d6c --- /dev/null +++ b/code_study/Baekjoon/js/31403.js @@ -0,0 +1,3 @@ +const n = require("fs").readFileSync(0, "utf8").toString().trim().split('\n'); +console.log(Number(n[0])+Number(n[1])-Number(n[2])); +console.log(n[0]+n[1] - n[2]); \ No newline at end of file diff --git a/code_study/Baekjoon/python/10250.py b/code_study/Baekjoon/python/10250.py new file mode 100644 index 0000000..085f094 --- /dev/null +++ b/code_study/Baekjoon/python/10250.py @@ -0,0 +1,5 @@ +for _ in range(int(input())) : + h, w, n = map(int, input().split()) + floor = h if n%h==0 else n%h + number = n//h if n%h==0 else n//h+1 + print(f"{floor}{'0' if number<10 else ''}{number}") \ No newline at end of file diff --git a/code_study/Baekjoon/python/2475.py b/code_study/Baekjoon/python/2475.py new file mode 100644 index 0000000..f809595 --- /dev/null +++ b/code_study/Baekjoon/python/2475.py @@ -0,0 +1,2 @@ +arr = map(int, input().split()) +print(sum(v*v for v in arr)%10) \ No newline at end of file diff --git a/code_study/Baekjoon/python/2741.py b/code_study/Baekjoon/python/2741.py new file mode 100644 index 0000000..b0311d3 --- /dev/null +++ b/code_study/Baekjoon/python/2741.py @@ -0,0 +1,2 @@ +for n in range(1, int(input())+1) : + print(n) \ No newline at end of file diff --git a/code_study/Baekjoon/python/31403.py b/code_study/Baekjoon/python/31403.py new file mode 100644 index 0000000..87e7541 --- /dev/null +++ b/code_study/Baekjoon/python/31403.py @@ -0,0 +1,3 @@ +a,b,c = input(), input(), input() +print(int(a)+int(b)-int(c)) +print(int(a+b)-int(c)) \ No newline at end of file