改一下
This commit is contained in:
parent
fdd5e03322
commit
fd932e21fa
@ -184,7 +184,7 @@ function wrap_any(names, round) {
|
|||||||
// } else if ('score' in result) {
|
// } else if ('score' in result) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
win_rate_2 = (result.score * 100 / round).toFixed(2);
|
win_rate_2 = (result.score * 10000 / round).toFixed(2);
|
||||||
output_str_2 = "\u5206\u6570:|".concat(win_rate_2, "%|(").concat(round, "\u8F6E)");
|
output_str_2 = "\u5206\u6570:|".concat(win_rate_2, "%|(").concat(round, "\u8F6E)");
|
||||||
if (round > 1000) {
|
if (round > 1000) {
|
||||||
output_datas_2 = [];
|
output_datas_2 = [];
|
||||||
@ -214,7 +214,7 @@ function main() {
|
|||||||
fs = require("fs");
|
fs = require("fs");
|
||||||
path = require("path");
|
path = require("path");
|
||||||
names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
|
names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
|
||||||
return [4 /*yield*/, wrap_any(names, 1000)];
|
return [4 /*yield*/, wrap_any(names, 10000)];
|
||||||
case 1:
|
case 1:
|
||||||
result = _a.sent();
|
result = _a.sent();
|
||||||
console.log(result);
|
console.log(result);
|
||||||
|
@ -167,7 +167,7 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
|||||||
// } else if ('score' in result) {
|
// } else if ('score' in result) {
|
||||||
} else {
|
} else {
|
||||||
// 分数结果其实还是个胜率, 不过需要 * 100
|
// 分数结果其实还是个胜率, 不过需要 * 100
|
||||||
const win_rate = (result.score * 100 / round).toFixed(2);
|
const win_rate = (result.score * 10000 / round).toFixed(2);
|
||||||
let output_str = `分数:|${win_rate}%|(${round}轮)`;
|
let output_str = `分数:|${win_rate}%|(${round}轮)`;
|
||||||
if (round > 1000) {
|
if (round > 1000) {
|
||||||
// 把所有要找的数据拿出来
|
// 把所有要找的数据拿出来
|
||||||
@ -195,7 +195,7 @@ async function main() {
|
|||||||
// const result = await fight(names);
|
// const result = await fight(names);
|
||||||
// const result = await md5_module.run_any(names, 50000);
|
// const result = await md5_module.run_any(names, 50000);
|
||||||
// console.log(`赢家:|${result.source_plr}|`);
|
// console.log(`赢家:|${result.source_plr}|`);
|
||||||
const result = await wrap_any(names, 1000);
|
const result = await wrap_any(names, 10000);
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user