Skip to content

Commit 3b36b65

Browse files
authored
Update Solution.java
1 parent 6a1a69a commit 3b36b65

File tree

1 file changed

+0
-3
lines changed
  • src/main/java/g3101_3200/s3179_find_the_n_th_value_after_k_seconds

1 file changed

+0
-3
lines changed

src/main/java/g3101_3200/s3179_find_the_n_th_value_after_k_seconds/Solution.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ public int valueAfterKSeconds(int n, int k) {
1616
private int combination(int a, int b) {
1717
long numerator = 1;
1818
long denominator = 1;
19-
2019
for (int i = 0; i < b; i++) {
2120
numerator = (numerator * (a - i)) % mod;
2221
denominator = (denominator * (i + 1)) % mod;
2322
}
24-
2523
// Calculate the modular inverse of denominator
2624
long denominatorInverse = power(denominator, mod - 2);
27-
2825
return (int) ((numerator * denominatorInverse) % mod);
2926
}
3027

0 commit comments

Comments
 (0)