fix: update challenge 359 rounding test case (#69284)

Co-authored-by: Rikka-8964 <204355417+Rikka-8964@users.noreply.github.com>
This commit is contained in:
rikka8964
2026-08-06 02:23:26 +08:00
committed by GitHub
parent 97320a9139
commit f0a7d3a4a0
2 changed files with 4 additions and 4 deletions
@@ -25,10 +25,10 @@ assert.equal(calculateHandicap([72, 72, 72], [72, 72, 72]), 0);
assert.equal(calculateHandicap([80, 76, 78, 78], [72, 72, 72, 72]), 6);
```
`calculateHandicap([42, 45, 46, 44], [36, 36, 36, 36])` should return `8.3`.
`calculateHandicap([42, 45, 46, 45], [36, 36, 36, 36])` should return `8.5`.
```js
assert.equal(calculateHandicap([42, 45, 46, 44], [36, 36, 36, 36]), 8.3);
assert.equal(calculateHandicap([42, 45, 46, 45], [36, 36, 36, 36]), 8.5);
```
`calculateHandicap([85, 80, 76, 79, 82], [72, 72, 72, 71, 71])` should return `8.8`.
@@ -31,12 +31,12 @@ TestCase().assertEqual(calculate_handicap([80, 76, 78, 78], [72, 72, 72, 72]), 6
}})
```
`calculate_handicap([42, 45, 46, 44], [36, 36, 36, 36])` should return `8.3`.
`calculate_handicap([42, 45, 46, 45], [36, 36, 36, 36])` should return `8.5`.
```js
({test: () => { runPython(`
from unittest import TestCase
TestCase().assertEqual(calculate_handicap([42, 45, 46, 44], [36, 36, 36, 36]), 8.3)`)
TestCase().assertEqual(calculate_handicap([42, 45, 46, 45], [36, 36, 36, 36]), 8.5)`)
}})
```