From ebe2262463b59ecf7cf90609dd58400238565708 Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Sun, 1 Jun 2025 20:10:44 +0900 Subject: [PATCH] 20250601 baekjoon javascript --- code_study/Baekjoon/js/10988.js | 9 +++++++++ code_study/Baekjoon/js/1157.js | 17 +++++++++++++++++ code_study/Baekjoon/js/2444.js | 7 +++++++ code_study/Baekjoon/js/25083.js | 3 +++ code_study/Baekjoon/js/3003.js | 3 +++ 5 files changed, 39 insertions(+) create mode 100644 code_study/Baekjoon/js/10988.js create mode 100644 code_study/Baekjoon/js/1157.js create mode 100644 code_study/Baekjoon/js/2444.js create mode 100644 code_study/Baekjoon/js/25083.js create mode 100644 code_study/Baekjoon/js/3003.js diff --git a/code_study/Baekjoon/js/10988.js b/code_study/Baekjoon/js/10988.js new file mode 100644 index 0000000..d39df78 --- /dev/null +++ b/code_study/Baekjoon/js/10988.js @@ -0,0 +1,9 @@ +const s = require("fs").readFileSync(0, "utf8").toString().trim(); +let flag = 1; +for(let i=0; i1 ? '?' : String.fromCharCode('A'.charCodeAt()+max_idx)); diff --git a/code_study/Baekjoon/js/2444.js b/code_study/Baekjoon/js/2444.js new file mode 100644 index 0000000..d37d06c --- /dev/null +++ b/code_study/Baekjoon/js/2444.js @@ -0,0 +1,7 @@ +const n = Number(require("fs").readFileSync(0, "utf8").toString()); +for(let i=1; i<=n; i++){ + console.log(' '.repeat(n-i) + '*'.repeat(2*i-1)); +} +for(let i=n-1; i>0; i--){ + console.log(' '.repeat(n-i) + '*'.repeat(2*i-1)); +} \ No newline at end of file diff --git a/code_study/Baekjoon/js/25083.js b/code_study/Baekjoon/js/25083.js new file mode 100644 index 0000000..45cf1b7 --- /dev/null +++ b/code_study/Baekjoon/js/25083.js @@ -0,0 +1,3 @@ +console.log( + " ,r'\"7\nr`-_ ,' ,/\n \\. \". L_r'\n `~\\/\n |\n |" +); \ No newline at end of file diff --git a/code_study/Baekjoon/js/3003.js b/code_study/Baekjoon/js/3003.js new file mode 100644 index 0000000..e09f41c --- /dev/null +++ b/code_study/Baekjoon/js/3003.js @@ -0,0 +1,3 @@ +const n = require("fs").readFileSync(0,'utf8').toString().split(" ").map(Number); +const arr = [1,1,2,2,2,8]; +console.log(...arr.map((v,i)=>v-n[i])); \ No newline at end of file