Skip to content

Commit

Permalink
Rollback changes around int128
Browse files Browse the repository at this point in the history
  • Loading branch information
meatball133 committed Dec 22, 2024
1 parent 8eff39b commit 750fc04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Foundation
func isArmstrongNumber(_ number: Int) -> Bool {
let stringNumber = String(number)
let numberLength = stringNumber.count
let sum: Int = stringNumber.compactMap { Int(String($0)) }.reduce(0) { $0 + Int(pow(Double($1), Double(numberLength))) }
let sum = stringNumber.compactMap { Int(String($0)) }.reduce(0) { $0 + Int(pow(Double($1), Double(numberLength))) }
return sum == number
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
func isArmstrongNumber(_ number: Int128) -> Bool {
func isArmstrongNumber(_ number: Int) -> Bool {
// Write your code for the 'Armstrong Numbers' exercise here.
}

0 comments on commit 750fc04

Please sign in to comment.