[2557번] Hello Word
1
2
|
console.log("강한친구 대한육군")
console.log("강한친구 대한육군")
|
cs |
[10171번] 고양이
1
2
3
4
5
6
|
console.log(
"\\ /\\\n" +
" ) ( ')\n" +
"( / )\n" +
" \\(__)|"
)
|
cs |
[10172번] 개
1
2
3
4
5
6
|
console.log("|\\_/|");
console.log("|q p| /}");
console.log('( 0 )"""\\');
console.log('|"^"` |');
console.log("||_/=\\\\__|");
|
cs |
[1000번] A+B
1
2
3
4
5
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split(' ');
let a = parseInt(input[0]);
let b = parseInt(input[1]);
console.log(a+b);
|
cs |
[1001번] A-B
1
2
3
4
5
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split(' ');
let a = parseInt(input[0]);
let b = parseInt(input[1]);
console.log(a-b);
|
cs |
[10998번] A*B
1
2
3
4
5
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split(' ');
let a = parseInt(input[0]);
let b = parseInt(input[1]);
console.log(a*b);
|
cs |
[1008번] A/B
1
2
3
4
5
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split(' ');
let a = parseInt(input[0]);
let b = parseInt(input[1]);
console.log(a/b);
|
cs |
[10869번] 사칙연산
1
2
3
4
5
6
7
8
9
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split(' ');
let a = Number(input[0]);
let b = Number(input[1]);
console.log(a+b);
console.log(a-b);
console.log(a*b);
console.log(parseInt(a/b));
console.log(a%b);
|
cs |
[10430번] 나머지
1
2
3
4
5
6
7
8
|
let fs = require('fs');
let inputData = fs.readFileSync('/dev/stdin').toString().split(' ').map(val=>+val);
let [A,B,C] = inputData
console.log( (A+B)%C );
console.log( ((A%C) + (B%C))%C );
console.log( (A*B)%C );
console.log( ((A%C) * (B%C))%C );
|
cs |
[2588번] 곱셈
1
2
3
4
5
6
7
8
9
10
11
12
13
|
let fs = require('fs');
let input = fs.readFileSync('/dev/stdin').toString().split('\n');
let Num1 = input[0];
let Num2 = input[1];
let oneNum = Num2 % 10;
let tenNum = Math.floor((Num2 % 100) / 10);
let hundredNum = Math.floor(Num2 / 100);
console.log(Num1*oneNum);
console.log(Num1*tenNum);
console.log(Num1*hundredNum);
console.log(Num1*Num2);
|
cs |
'백준' 카테고리의 다른 글
7/7[문제풀이] 백준 단계 3 / for문 (0) | 2021.07.07 |
---|---|
7/6[문제풀이] 백준 단계2 / if문 (0) | 2021.07.06 |