+ 4

Issue with Solving Divisible In Swift (Code Coach)

Hello. I noticed when trying to solve Divisible in Swift, only Test Case 3 is not solved. I even tried a simple print of “divisible by all” or “not divisible by all” to see if Test Case 3 turns green. It stayed red both times. Is this a known unresolved issue?

3rd May 2020, 3:34 AM
GYPSYGIRL80
GYPSYGIRL80 - avatar
4 odpowiedzi
+ 14
Hi. I met the same situation and solved by the below for the first input. var input = readLine()! var dummy = input.split(separator: ' ') var first = Int(dummy[0]) In only Test Case 3, SPACE probably exists behind the fist input's number.
30th Oct 2020, 11:25 AM
Satoshi Hirano
Satoshi Hirano - avatar
+ 6
Satoshi Hirano, THANK YOU SO MUCH!!! I did not realize that there may have been an extra space next to the first number. 😅😅. I hope SoloLearn sees your comment and make the necessary changes. Thanks again 😊😊😊
1st Nov 2020, 9:40 AM
GYPSYGIRL80
GYPSYGIRL80 - avatar
+ 4
I just checked test 3 passed by : print("divisible by all")
3rd May 2020, 6:01 AM
Bahhaⵣ
Bahhaⵣ - avatar
+ 3
My code didn't pass the 3rd test either. I tried to input the example given in the problem statement, with extra space and it worked normally.
29th Nov 2021, 5:54 PM
Lucas Kliemczak
Lucas Kliemczak - avatar