mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
util: fix score calculation
This commit is contained in:
1 parent
cb18ec19fe
commit
b367069050
6 files changed
+8
-5
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user