20250507 baekjoon

This commit is contained in:
notalentprogrammer 2025-05-07 22:41:48 +09:00
parent f00b19f981
commit 81b26c9230
8 changed files with 34 additions and 0 deletions

5
Baekjoon/js/1008.js Executable file
View File

@ -0,0 +1,5 @@
const fs = require("fs");
const n = fs.readFileSync("/dev/stdin").toString().split(" ");
const a = parseInt(n[0]);
const b = parseInt(n[1]);
console.log(a/b);

6
Baekjoon/js/10430.js Executable file
View File

@ -0,0 +1,6 @@
const fs = require("fs");
const n = fs.readFileSync("/dev/stdin").toString().split(" ");
const a = parseInt(n[0]);
const b = parseInt(n[1]);
const c = parseInt(n[2]);
console.log((a+b)%c,((a%c)+(b%c))%c,(a*b)%c,((a%c)*(b%c))%c);

5
Baekjoon/js/10869.js Executable file
View File

@ -0,0 +1,5 @@
const fs = require("fs");
const n = fs.readFileSync("/dev/stdin").toString().split(" ");
const a = parseInt(n[0]);
const b = parseInt(n[1]);
console.log(a+b,a-b,a*b,Math.floor(a/b),a%b);

3
Baekjoon/js/10926.js Executable file
View File

@ -0,0 +1,3 @@
const fs = require("fs");
const s = fs.readFileSync("/dev/stdin").toString().trim();
console.log(s+"??!");

5
Baekjoon/js/10998.js Executable file
View File

@ -0,0 +1,5 @@
const fs = require("fs");
const n = fs.readFileSync("/dev/stdin").toString().split(" ");
const a = parseInt(n[0]);
const b = parseInt(n[1]);
console.log(a*b);

2
Baekjoon/js/11382.js Executable file
View File

@ -0,0 +1,2 @@
const n = require("fs").readFileSync("/dev/stdin").toString().split(" ").map(Number);
console.log(n[0]+n[1]+n[2]);

3
Baekjoon/js/18108.js Executable file
View File

@ -0,0 +1,3 @@
const fs = require("fs");
const n = fs.readFileSync("/dev/stdin").toString();
console.log(n-543);

5
Baekjoon/js/2588.js Executable file
View File

@ -0,0 +1,5 @@
const n = require("fs").readFileSync("/dev/stdin").toString().split("\n").map(Number);
const a = n[1]%10;
const b = (n[1]%100 - a)/10;
const c = (n[1]%1000-n[1]%100)/100;
console.log(n[0]*a,n[0]*b,n[0]*c,n[0]*n[1]);