Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8508517

Browse files
committed
fixed 201 -1 can not shift bug
1 parentdc285aa commit8508517

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎notes/LeetCode第201号问题:数字范围按位与.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
classSolution {
4949
public:
5050
int rangeBitwiseAnd(int m, int n) {
51-
int d = INT_MAX;
51+
unsignedint d = INT_MAX;
5252
while ((m & d) != (n & d)) {
5353
d <<= 1;
5454
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp