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

Commit 80525e0

Browse files
klever34yanglbme
authored andcommitted
code update
1 parent d0cbc74 commit 80525e0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎lcci/05.06.Convert Integer/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl Solution {
9494
```swift
9595
class Solution {
9696
func convertInteger(_ A: Int, _ B: Int) -> Int {
97-
return (A ^ B).nonzeroBitCount
97+
return (Int32(A) ^ Int32(B)).nonzeroBitCount
9898
}
9999
}
100100
```

‎lcci/05.06.Convert Integer/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl Solution {
111111
```swift
112112
class Solution {
113113
func convertInteger(_ A: Int, _ B: Int) -> Int {
114-
return (A ^ B).nonzeroBitCount
114+
return (Int32(A) ^ Int32(B)).nonzeroBitCount
115115
}
116116
}
117117
```
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Solution {
22
func convertInteger(_ A: Int, _ B: Int) -> Int {
3-
return (A ^ B).nonzeroBitCount
3+
return (Int32(A) ^ Int32(B)).nonzeroBitCount
44
}
5-
}
5+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /