chore: top 10 socres

This commit is contained in:
2024-10-08 14:01:01 +08:00
parent 742058ded0
commit d524df505c
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -21,8 +21,8 @@
<p>该页面展示<strong>得分前五名</strong>和<strong>最近三十次提交成功</strong>的数据(包括<strong>零分</strong>)。</p>
<p>数据非实时刷新,可能有最长<strong>五分钟</strong>的延迟。</p>
<p>详细日志信息点击「查看详情」即可查看。</p>
<h2 id="前五名排行榜">前五名排行榜 </h2>
<p>这里展示<strong>得分前五名</strong>的数据。</p>
<h2 id="前十名排行榜">前十名排行榜 </h2>
<p>这里展示<strong>得分前十名</strong>的数据。</p>
<p>以得分排序,分数高的靠前,若分数相同,则运行时间短的靠前。</p>
<hr>
<table>
+2 -2
View File
@@ -6,9 +6,9 @@
详细日志信息点击「查看详情」即可查看。
## 前五名排行榜
## 前十名排行榜
这里展示**得分前五名**的数据。
这里展示**得分前十名**的数据。
以得分排序,分数高的靠前,若分数相同,则运行时间短的靠前。
+2 -2
View File
@@ -152,10 +152,10 @@ def get_top_scores(project):
if student_id not in best_scores_by_id:
best_scores_by_id[student_id] = score
# 取前五名
# 取前十名
for score in scores:
score["running_time"] = str(score["running_time"]) + "ms"
top_scores = list(best_scores_by_id.values())[:5]
top_scores = list(best_scores_by_id.values())[:10]
response = jsonify(top_scores)
response.headers.add("Access-Control-Allow-Origin", "*")