Skip to content

Commit 1fec7d7

Browse files
committed
알고리즘 풀이 업데이트
1 parent 15f45cd commit 1fec7d7

File tree

2 files changed

+22
-31
lines changed

2 files changed

+22
-31
lines changed

part1/5.주사위세개.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
let fs = require("fs")
2+
let input = fs.readFileSync("input.txt").toString().split("\n")
3+
4+
const [a, b, c] = input[0].split(" ").map(Number)
5+
6+
if (a == b && b == c) {
7+
console.log(10000 + a * 1000)
8+
}
9+
else if (a == b || b == c || a == c) {
10+
if (a - b == 0) {
11+
console.log(1000 + a * 100)
12+
} else if (a - c == 0) {
13+
console.log(1000 + a * 100)
14+
} else if (b - c == 0) {
15+
console.log(1000 + b * 100)
16+
}
17+
18+
}
19+
else {
20+
console.log(Math.max(a, b, c) * 100)
21+
}
22+

섹션8/9.동전교환.html

-31
This file was deleted.

0 commit comments

Comments
 (0)