Skip to content

Commit 2e106ee

Browse files
committed
Fix proof implementation
1 parent 86a397a commit 2e106ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/grains/.meta/proof.ci.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ export function square(square: number): bigint {
33
throw new Error()
44
}
55

6-
return BigInt(square) ** 2n
6+
return 2n ** BigInt(square - 1)
77
}
88

99
export function total(): bigint {
1010
let total = 0n
1111

1212
for (let i = 1; i <= 64; i++) {
13-
total += this.square(i)
13+
total += square(i)
1414
}
1515

1616
return total

0 commit comments

Comments
 (0)