util: fix score calculation

This commit is contained in:
undefined committed 2022-06-25 21:55:47 +08:00
1 parent cb18ec19fe
commit b367069050
6 files changed
+8 -5

No files matched your search

+1 -1
View File
@@ -205,7 +205,7 @@ const SubtaskMatcher: MatchRule[] = [
function* getScore(totalScore: number, count: number) {
const base = Math.floor(totalScore / count);
const extra = count - (100 % count);
const extra = count - (totalScore % count);
for (let i = 0; i < count; i++) {
if (i >= extra) yield base + 1;
else yield base;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/utils",
"version": "1.2.5",
"version": "1.2.6",
"description": "hydrooj utils",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",