From 6fcf48acdeabf95c617295a8d6c024a65d393344 Mon Sep 17 00:00:00 2001 From: Menci Date: Wed, 15 Mar 2017 00:27:58 +0800 Subject: [PATCH] Allow float subtask score --- utility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility.js b/utility.js index 6140f42..6767fc9 100644 --- a/utility.js +++ b/utility.js @@ -194,7 +194,7 @@ module.exports = { if (numbers[0].includes(':')) { let tokens = numbers[0].split(':'); res[s].type = tokens[0] || 'sum'; - res[s].score = parseInt(tokens[1]) || (100 / (lines.length - 2)); + res[s].score = parseFloat(tokens[1]) || (100 / (lines.length - 2)); numbers.shift(); } else { res[s].type = 'sum';