Extra-Terrestrials task | Sololearn: Learn to code for FREE!

+1

Extra-Terrestrials task

Could someone tell me what's wrong in this code or wich is the test case 3? https://code.sololearn.com/cKNf9H99esja/?ref=app

c

1/17/2020 10:28:14 PM

David Martínez Castañón

7 Answers

New Answer

+3

The size. It is not big enough. Try 90 instead of 20.

+1

+1

I have been testing the code and if you write i<length instead of i<=length or i<length+1 sometimes it doesn't work. I don't really know why this happends, but if the word's length is a multiple of 4 a question mark appears at the end

0

why is there a "+1" in the loop condition?

0

I wrote that code a long time ago so I don't remember it very well. I think it was because since there is a minor instead of an equal or minor, the loop did not reach the last character. Anyway, I should change it a little bit

0

can you explain it a little more

0

please do post if you find why this happens