0

Solving 2D map task via complex numbers, my decision fails 1 secret test, and I can't understand why?

https://code.sololearn.com/c9gTQbKcvz21/?ref=app

5th Apr 2023, 5:41 PM
Алексей Молодан
Алексей Молодан - avatar
5 Respostas
+ 5
a = "XXXXP,XXXXX,XXXXX,XXXPX,XXXXX" should print 4, but this code prints 2.
5th Apr 2023, 5:49 PM
Brian
Brian - avatar
+ 2
I corrected code, now works, thanks
5th Apr 2023, 6:23 PM
Алексей Молодан
Алексей Молодан - avatar
+ 2
You are welcome!
5th Apr 2023, 9:35 PM
Brian
Brian - avatar
+ 1
I forgot abs()
5th Apr 2023, 6:22 PM
Алексей Молодан
Алексей Молодан - avatar
0
Thank You Brian ! Seemed I understand the reason.
5th Apr 2023, 6:12 PM
Алексей Молодан
Алексей Молодан - avatar