【修改】 C语言判分测试用例分数,正确加分,错误不加分

This commit is contained in:
dlaren
2025-07-22 15:48:09 +08:00
parent b7607d3c9c
commit f3c7925f16

View File

@@ -198,8 +198,8 @@ public class JudgementServiceImpl implements JudgementService
BigDecimal singleScore = new BigDecimal((double) Integer.parseInt(scoreRate) / 100).setScale(2, BigDecimal.ROUND_HALF_UP);
// 单个测试用例正确情况下得分
BigDecimal oneCompileScore = compileScore.multiply(singleScore).setScale(2, BigDecimal.ROUND_HALF_UP);
compile_score += Double.parseDouble(oneCompileScore.toString());
if (success) {
compile_score += Double.parseDouble(oneCompileScore.toString());
judgementStr = HtmlAppender.appendHtmlLine(judgementStr, "✅ 测试用例:输入("+
inText + ")" +
",正确结果:(" + resultTrueText + ")" +