fix comment
This commit is contained in:
parent
0bcf47326f
commit
dc76148408
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue