diff --git a/hoj-vue/src/views/oj/problem/ProblemList.vue b/hoj-vue/src/views/oj/problem/ProblemList.vue index f754bb98..64f634ad 100644 --- a/hoj-vue/src/views/oj/problem/ProblemList.vue +++ b/hoj-vue/src/views/oj/problem/ProblemList.vue @@ -403,6 +403,11 @@ export default { this.limit = pageSize; this.getProblemList(); }, + getPercentage(partNumber, total) { + return partNumber == 0 + ? 0 + : Math.round((partNumber / total) * 10000) / 100.0; + }, getPassingRate(ac, total) { if (!total) { return 0;