[Accepted] Swift
\nclass Solution {\n    func smallestEqual(_ nums: [Int]) -> Int {\n        nums.indices.first { $0 % 10 == nums[$0] } ?? -1\n    }\n}\n
```\nclass Solution {\n    func smallestEqual(_ nums: [Int]) -> Int {\n        nums.indices.first { $0 % 10 == nums[$0] } ?? -1\n    }\n}\n```
['Swift']