fix comment

main
Christian Ulrich 2021-12-07 22:06:49 +01:00
parent 0bcf47326f
commit dc76148408
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ import strutils
proc distance(a, b: uint16): int =
let linearDistance = if a < b: int(b - a) else: int(a - b)
# 1 + 2 + 3 + ... + n - 1 is the binomial coefficient (k over n) with k = 2
# 1 + 2 + 3 + ... + n - 1 is the binomial coefficient (n over k) with k = 2
result = (linearDistance + 1) * linearDistance div 2
proc minimizeFuel(): int =