단계별 풀기의 첫 단계인 입출력과 사칙연산, 자바스크립트로 풀었습니다.
2557. Hello World
console.log('Hello World!');
10718. We Love kriii
console.log('강한친구 대한육군');
console.log('강한친구 대한육군');
10171. 고양이
console.log(`\\ /\\`);
console.log(` ) ( ')`);
console.log(`( / )`);
console.log(` \\(__)|`);
10172. 개
console.log("|\\_/|");
console.log("|q p| /}");
console.log('( 0 )"""\\');
console.log('|"^"` |');
console.log("||_/=\\\\__|");
1000. A+B
let fs = require("fs");
let input = fs.readFileSync("/dev/stdin").toString().split(" ").map(x => +x);
const reducer = (val1, val2) => val1 + val2;
console.log(input.reduce(reducer));
1001. A-B
let fs = require("fs");
let input = fs.readFileSync("/dev/stdin").toString().split(" ").map(x => +x);
console.log(input[0]-input[1]);
10998. A*B
let fs = require("fs");
let input = fs.readFileSync("/dev/stdin").toString().split(" ").map(x => +x);
console.log(input[0] * input[1]);
1008. A/B
let fs = require("fs");
let input = fs
.readFileSync("/dev/stdin")
.toString()
.split(" ")
.map((x) => +x);
console.log(input[0] / input[1]);
10869. 사칙연산
let fs = require("fs");
let input = fs
.readFileSync("/dev/stdin")
.toString()
.split(" ")
.map((x) => +x);
console.log(input[0] + input[1]);
console.log(input[0] - input[1]);
console.log(input[0] * input[1]);
console.log(Math.floor(input[0] / input[1]));
console.log(input[0] % input[1]);
10430. 나머지
let fs = require("fs");
let input = fs
.readFileSync("/dev/stdin")
.toString()
.split(" ")
.map((x) => +x);
let a = input[0];
let b = input[1];
let c = input[2];
console.log((a + b) % c);
console.log(((a % c) + (b % c)) % c);
console.log((a * b) % c);
console.log(((a % c) * (b % c)) % c);
2588. 곱셈
let fs = require("fs");
let input = fs
.readFileSync("/dev/stdin")
.toString()
.split("\n")
.map((x) => +x);
let dividend = input[0];
let divisor = input[1]
.toString()
.split("")
.map((x) => +x);
console.log(input[0] * divisor[2]);
console.log(input[0] * divisor[1]);
console.log(input[0] * divisor[0]);
console.log(input[0] * input[1]);