From 375eabe025e4fa59d96e6593a949f6ee8bdf521c Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Fri, 6 Jun 2025 18:32:23 +0900 Subject: [PATCH] 20250606 baekjoon javascript --- code_study/Baekjoon/js/10798.js | 15 +++++++++++++++ code_study/Baekjoon/js/2563.js | 17 +++++++++++++++++ code_study/Baekjoon/js/2566.js | 16 ++++++++++++++++ code_study/Baekjoon/js/2738.js | 13 +++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 code_study/Baekjoon/js/10798.js create mode 100644 code_study/Baekjoon/js/2563.js create mode 100644 code_study/Baekjoon/js/2566.js create mode 100644 code_study/Baekjoon/js/2738.js diff --git a/code_study/Baekjoon/js/10798.js b/code_study/Baekjoon/js/10798.js new file mode 100644 index 0000000..6926e8d --- /dev/null +++ b/code_study/Baekjoon/js/10798.js @@ -0,0 +1,15 @@ +const input = require("fs").readFileSync(0,"utf8").toString().trim().split("\n"); +let s=""; + +for(let col=0; col<15; col++){ + let flag = true; + for(let row=0; row<5; row++){ + if(input[row][col] !== undefined){ + s += input[row][col]; + flag = false; + } + } + if(flag) break; +} + +console.log(s); \ No newline at end of file diff --git a/code_study/Baekjoon/js/2563.js b/code_study/Baekjoon/js/2563.js new file mode 100644 index 0000000..8cc182a --- /dev/null +++ b/code_study/Baekjoon/js/2563.js @@ -0,0 +1,17 @@ +const input = require("fs").readFileSync(0,"utf8").toString().split("\n"); +let paper = Array.from({length:100},()=>new Array(100).fill(0)); +let sum=0; + +for(let n=1; n<=Number(input[0]); n++){ + let [x, y] = input[n].split(' ').map(Number); + for(let i=x-1; i v+b[idx]); +} + +for(let i=0; i