From d7763d4c9287a5f3117a50987ec61facd1ae13da Mon Sep 17 00:00:00 2001 From: newbision Date: Mon, 30 May 2022 13:48:12 +0300 Subject: [PATCH] Update isLucky.swift --- Arcade/Intro/isLucky.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Arcade/Intro/isLucky.swift b/Arcade/Intro/isLucky.swift index 48ece97..098ed5b 100644 --- a/Arcade/Intro/isLucky.swift +++ b/Arcade/Intro/isLucky.swift @@ -1,10 +1,11 @@ // https://codefights.com/arcade/intro/level-3/3AdBC97QNuhF6RwsQ func isLucky(n: Int) -> Bool { - var a = String(n).characters.map { Int("\($0)")! }, h = a.count / 2 - var h1 = a[0..