Skip to content

Commit 89dd95e

Browse files
committed
Time: 1745 ms (14.29%), Space: 40.7 MB (60.58%) - LeetHub
1 parent 6a34cc3 commit 89dd95e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution {
2+
public long minEnd(int n, int x) {
3+
long a = x;
4+
while (--n > 0)
5+
a = (a + 1) | x;
6+
return a;
7+
}
8+
}

0 commit comments

Comments
 (0)