We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43317db commit 74c4d0bCopy full SHA for 74c4d0b
2 files changed
서정우/11주차/260310.js
@@ -0,0 +1,17 @@
1
+const fs = require("fs");
2
+const filePath =
3
+ process.platform === "linux" ? "/dev/stdin" : "./서정우/input.txt";
4
+const input = fs
5
+ .readFileSync(filePath)
6
+ .toString()
7
+ .trim()
8
+ .split("\n")
9
+ .map((el) => el.trim());
10
+
11
+const [N, M, S] = input[0].split(" ").map(Number);
12
13
+const unmannedPrice = Math.floor(((M + 1) * S * (100 - N)) / 100);
14
15
+const dealPrice = M * S;
16
17
+console.log(Math.min(unmannedPrice, dealPrice));
서정우/input.txt
@@ -1,4 +1 @@
-3
-26 40 83
-49 60 57
-13 89 99
+40 1 100
0 commit comments