diff --git a/exercises/practice/armstrong-numbers/.meta/Sources/ArmstrongNumbers/ArmstrongNumbersExample.swift b/exercises/practice/armstrong-numbers/.meta/Sources/ArmstrongNumbers/ArmstrongNumbersExample.swift index 1637e6610..df0d8576a 100644 --- a/exercises/practice/armstrong-numbers/.meta/Sources/ArmstrongNumbers/ArmstrongNumbersExample.swift +++ b/exercises/practice/armstrong-numbers/.meta/Sources/ArmstrongNumbers/ArmstrongNumbersExample.swift @@ -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 } diff --git a/exercises/practice/armstrong-numbers/Sources/ArmstrongNumbers/ArmstrongNumbers.swift b/exercises/practice/armstrong-numbers/Sources/ArmstrongNumbers/ArmstrongNumbers.swift index 765387f1f..63b122561 100644 --- a/exercises/practice/armstrong-numbers/Sources/ArmstrongNumbers/ArmstrongNumbers.swift +++ b/exercises/practice/armstrong-numbers/Sources/ArmstrongNumbers/ArmstrongNumbers.swift @@ -1,3 +1,3 @@ -func isArmstrongNumber(_ number: Int128) -> Bool { +func isArmstrongNumber(_ number: Int) -> Bool { // Write your code for the 'Armstrong Numbers' exercise here. }